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:
parent
c5c8934db7
commit
6131465d23
|
@ -494,7 +494,10 @@ impl Service {
|
|||
.map_err(|_e| Error::BadRequest(ErrorKind::InvalidParam, "Auth check failed."))?;
|
||||
|
||||
if !check_result {
|
||||
return Err(Error::bad_database("Event has failed auth check with state at the event."));
|
||||
return Err(Error::BadRequest(
|
||||
ErrorKind::InvalidParam,
|
||||
"Event has failed auth check with state at the event.",
|
||||
));
|
||||
}
|
||||
|
||||
debug!("Gathering auth events");
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue