Skip to content

Create a handler that can yield either a successful response or an error message? #2268

Answered by davidpdrsn
kyborq asked this question in Q&A
Discussion options

You must be logged in to vote

Yes. Did you read the docs here https://docs.rs/axum/latest/axum/response/index.html? There are lots of examples.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kyborq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants