[#152] authmate: Add basic error types and exit codes #204

Merged
alexvanin merged 1 commit from ironbee/frostfs-s3-gw:add_error_types_to_authmate into master 2023-09-07 11:04:38 +00:00
Contributor

Signed-off-by: Artem Tataurov a.tataurov@yadro.com

From the issue:

Pull request adds the following errors:

preparationError - various error related to initialisation, parsing provided arguments, acquiring intermediate data.
frostFSInitError - errors related to FrostFS functioning.
businessLogicError - errors in main (business) goals of the authmate's modules.
This is an initial classification and may be changed an/or extended in future.

Closes #152.

Signed-off-by: Artem Tataurov <a.tataurov@yadro.com> From the issue: > Pull request adds the following errors: > > preparationError - various error related to initialisation, parsing provided arguments, acquiring intermediate data. > frostFSInitError - errors related to FrostFS functioning. > businessLogicError - errors in main (business) goals of the authmate's modules. > This is an initial classification and may be changed an/or extended in future. > Closes #152.
ironbee requested review from storage-services-committers 2023-09-04 18:09:23 +00:00
ironbee requested review from storage-services-developers 2023-09-04 18:09:24 +00:00
ironbee force-pushed add_error_types_to_authmate from 3a12d4bbf4 to d5bba6c4d6 2023-09-04 19:24:52 +00:00 Compare
mbiryukova approved these changes 2023-09-05 11:37:39 +00:00
alexvanin reviewed 2023-09-05 13:28:26 +00:00
@ -0,0 +39,4 @@
}
func (e businessLogicError) Error() string {
return fmt.Sprintf("business logic error: %v", e.err)
Owner

suggestion: Return just e.err in all these cases without text wrapping. Instead define return code + meaning relation in docs/authmate.md in a table format. In the table you can provide more info, e.g.

Code Meaning
2 Error in preparation step when user data is parsed
**suggestion**: Return just `e.err` in all these cases without text wrapping. Instead define return code + meaning relation in `docs/authmate.md` in a table format. In the table you can provide more info, e.g. |Code|Meaning| |-|-| | 2 | Error in preparation step when user data is parsed|
ironbee force-pushed add_error_types_to_authmate from d5bba6c4d6 to b86ca129db 2023-09-06 09:24:59 +00:00 Compare
ironbee force-pushed add_error_types_to_authmate from b86ca129db to c3dc945855 2023-09-06 09:39:14 +00:00 Compare
ironbee force-pushed add_error_types_to_authmate from c3dc945855 to 54e1c333a1 2023-09-06 20:57:07 +00:00 Compare
alexvanin approved these changes 2023-09-07 11:04:33 +00:00
alexvanin merged commit 54e1c333a1 into master 2023-09-07 11:04:38 +00:00
alexvanin deleted branch add_error_types_to_authmate 2023-09-07 11:04:39 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-s3-gw#204
No description provided.