mirror of https://github.com/agola-io/agola
![]() 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. |
||
---|---|---|
.. | ||
auth.go |