Repository navigation
Error result of an endpoint still returns Outcome::Success #2928
|
Hi! I Have an endpoint that returns the known sensors of a network switch and I am confused about the outcome. The docs state that an Here is the endpoin: And here is the Erorr enum: What am I doing wrong here? |
Answered by
the10thWiz
May 25, 2025
Replies: 1 comment
|
I'm not sure what docs you were reading, but according to |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not sure what docs you were reading, but according to
https://rocket.rs/guide/v0.5/responses/#result,Resultjust delegates the response to theOkorErrtype. The reason the endpoint as a whole returnsOutcome::Sucess, is because it successfully generates a response (even if that response is a 4XX or 5XX response).