don't use bad_database (HTTP 500) for auth check failures

this is not database-related, and may trigger exponential backoff
against us from other servers

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-04-16 18:19:47 -04:00 committed by June
parent c5c8934db7
commit 6131465d23
2 changed files with 5 additions and 2 deletions

View file

@ -744,7 +744,7 @@ impl Service {
)
.map_err(|e| {
error!("Auth check failed: {:?}", e);
Error::bad_database("Auth check failed.")
Error::BadRequest(ErrorKind::InvalidParam, "Auth check failed.")
})?;
if !auth_check {