Skip to content

How to use handle_error in MethodRouter properly #1786

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

You must be logged in to vote

Are you using tower-http 0.4? If so you don't need to wrap it in get_service and use handle_error at all. See https://github.com/tokio-rs/axum/blob/remove-spa-router/examples/static-file-server/src/main.rs

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@StarWishsama
Comment options

@davidpdrsn
Comment options

@danloh
Comment options

@StarWishsama
Comment options

Answer selected by StarWishsama
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants