agola/internal/services/handlers
Simone Gotti a8e25876a0 errors: split wrapped error from APIError message
Now, to add a message to an APIError, we had to wrap the starting error
with errors.Wrap or, in case of no starting error, we had to create a
new error with errors.Errorf.

This way isn't really clean since we are creating an intermediary
wrapping error.

With this patch NewAPIError could be used when there's no error to wrap
or the wrapped error can be provided using NewAPIErrorWrap. An optional
message could be added using the WithAPIErrorMsg option.
2024-04-09 08:55:03 +02:00
..
auth.go errors: split wrapped error from APIError message 2024-04-09 08:55:03 +02:00