Should implementing StatusError override default output?
#815
Unanswered
absolutejam
asked this question in
Q&A
Replies: 1 comment
-
|
Looks like you answered #663 which is very similar and points to using transformers, which I will look at as a solution 👍 Just curious if the the above behaviour is still expected though? ✌️ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey!
First off - thanks! This is the API framework Go needed 👏
Just a quick query - I was trying to implement
StatusErroron my custom error types so I could justreturn errin my handlers, but I noticed that when I do this, it just returns that error type in the response body instead of the usualErrorModel.Is this expected behaviour and if so, is there a way to enforce always wrapping in the standard
ErrorModel? Perhaps via. a post-request middlware?Cheers!
Beta Was this translation helpful? Give feedback.
All reactions