Skip to content

Commit

Permalink
Fix typo in unauthorized error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jokler committed Apr 3, 2024
1 parent 2884925 commit 476d4d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ pub enum Error {
#[error("Not Found")]
NotFound,

#[error("Unathorized")]
Unathorized,
#[error("Unauthorized")]
Unauthorized,

// This is returned in hivefriends when a received field is too long.
#[error("{field} should not be longer than {maximum_length} characters")]
Expand Down Expand Up @@ -61,7 +61,7 @@ impl IntoResponse for Error {
fn into_response(self) -> Response {
// First we figure out which status code the error correlates to.
let status = match &self {
Error::Unathorized => StatusCode::UNAUTHORIZED,
Error::Unauthorized => StatusCode::UNAUTHORIZED,
Error::NotFound => StatusCode::NOT_FOUND,
Error::InternalError(e) => {
// In the case of an internal error we won't return any information to the front
Expand Down

0 comments on commit 476d4d2

Please sign in to comment.