Skip to content

Commit

Permalink
Merge pull request #266 from wepala/feature/error-message-fix
Browse files Browse the repository at this point in the history
error message fix
  • Loading branch information
akeemphilbert authored May 9, 2023
2 parents a4009b7 + dd5b901 commit b0baee3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/rest/default_controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func DefaultWriteController(api Container, commandDispatcher model.CommandDispat
//an error handler `HTTPErrorHandler` can be defined on the echo instance to handle error responses
if err != nil {
if derr, ok := err.(*model.DomainError); ok && derr.Code == 400 {
return ctxt.JSON(http.StatusBadRequest, commandResponse)
return ctxt.JSON(http.StatusBadRequest, derr)
}
return err
}
Expand Down

0 comments on commit b0baee3

Please sign in to comment.