mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-26 10:27:42 +02:00
Bugfix: AuthenticationError should set status_code
I noticed that my `AuthenticationError`'s `status_code` field was 401, but when I ran `.as_response_error()` the `ResponseError`'s code was 500 (the default value). It's because impl ResponseError for AuthenticationError doesn't define the `status_code()` trait method. Merely setting the status code in `error_response` isn't enough, it seems. I added a unit test for this case too.
This commit is contained in:
committed by
Adam Chalmers
parent
5c6c04caf3
commit
a50f1db473
@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [unreleased]
|
||||
- Update the `base64` dependency to 0.12
|
||||
- AuthenticationError's status code is preserved when converting to a ResponseError
|
||||
|
||||
## [0.4.1] - 2020-02-19
|
||||
- Move repository to actix-extras
|
||||
|
Reference in New Issue
Block a user