Replies: 1 comment
-
One approach would be to map the errors into a custom error type that you create so that all of them map to the type you declare on the route. In the following example I'm returning the status directly but you can apply this mapping strategy for anything.
|
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
-
Basically, I am using uuid::Uuid as well as the Scylla Rust Driver. The problem is that the Scylla Rust Driver throws its own error types of QueryError and FromRowError and the Uuid::parse_str throws uuid::error. My question is that in my route handler function I would effectively like the ability to simply do:
The problem is I do not know how to approach this in rocket as I am new.
Beta Was this translation helpful? Give feedback.
All reactions