Replies: 2 comments
-
Sort of, although this will be much easier in 0.6. Today, you can declare your request guards to be I'm currently working on a feature to implement typed errors, which would allow a catcher to directly catch your error struct, and could then respond with it. |
Beta Was this translation helpful? Give feedback.
0 replies
-
ok, great. thank you! |
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
-
I have a custom error type that just has a message field, and it implements the responder trait, which just serializes it into json. I would like to use this type throughout my entire application, however, for request guards, the Error associated type in the trait isn't actually returned to the user of the api, instead, it's just logged in the console and the catcher for that status code is used instead of my custom error type being returned to the user of the api. is there a way to change this behavior?
Here is my custom error type if it helps:
Beta Was this translation helpful? Give feedback.
All reactions