1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

storage: unify the compat login errors

This commit is contained in:
Quentin Gliech
2022-12-07 17:26:28 +01:00
parent 1ddc05ff01
commit f7f65e314b
14 changed files with 314 additions and 359 deletions

View File

@@ -224,7 +224,7 @@ pub enum ClientAuthorizationError {
MissingCredentials,
InvalidRequest,
InvalidAssertion,
InternalError(Box<dyn std::error::Error>),
Internal(Box<dyn std::error::Error>),
}
impl IntoResponse for ClientAuthorizationError {
@@ -289,7 +289,7 @@ where
return Err(ClientAuthorizationError::BadForm(err))
}
// Other errors (body read twice, byte stream broke) return an internal error
Err(e) => return Err(ClientAuthorizationError::InternalError(Box::new(e))),
Err(e) => return Err(ClientAuthorizationError::Internal(Box::new(e))),
};
// And now, figure out the actual auth method