cloudapi/v2: include details in case internal error is set
In case details aren't explicitly given, and the internal error is set, include the internal error message in the details.
This commit is contained in:
parent
5ce8f65a58
commit
135dd94de5
4 changed files with 31 additions and 34 deletions
|
|
@ -77,7 +77,7 @@ func (h *apiHandlers) GetError(ctx echo.Context, id string) error {
|
|||
return HTTPError(ErrorInvalidErrorId)
|
||||
}
|
||||
|
||||
apiError := APIError(ServiceErrorCode(errorId), nil, ctx, nil)
|
||||
apiError := APIError(find(ServiceErrorCode(errorId)), ctx, nil)
|
||||
// If the service error wasn't found, it's a 404 in this instance
|
||||
if apiError.Id == fmt.Sprintf("%d", ErrorServiceErrorNotFound) {
|
||||
return HTTPError(ErrorErrorNotFound)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue