mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 13:36:59 +00:00
refactor(core/result): add NotAuthenticated error which is distinct from InvalidCredentials
This commit is contained in:
@@ -18,7 +18,7 @@ impl FromRequestParts<Database> for User {
|
||||
let session = db.fetch_session_by_token(session_token).await?;
|
||||
db.fetch_user(&session.user_id).await
|
||||
} else {
|
||||
Err(create_error!(InvalidCredentials))
|
||||
Err(create_error!(NotAuthenticated))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user