Build an API in Rust with JWT Authentication using actix-web

Great article, very nice!

I did find 1 nitpick (not 100% sure though). But in the handlers you are mapping the errors like this:

.map_err(|_| HttpResponse::InternalServerError())

But should it not be:

.map_err(|_| ServiceError::InternalServerError)

Both will definitely work but since you took the effort of defining a custom error handler, it might be nice to use it in the handlers as well.

Thanks for writing the article.