mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-13 21:17:05 +00:00
fix: match new error type for status code
This commit is contained in:
@@ -42,6 +42,7 @@ impl IntoResponse for Error {
|
||||
ErrorType::InvalidRole => StatusCode::NOT_FOUND,
|
||||
ErrorType::Banned => StatusCode::FORBIDDEN,
|
||||
ErrorType::AlreadyInServer => StatusCode::CONFLICT,
|
||||
ErrorType::CannotTimeoutYourself => StatusCode::BAD_REQUEST,
|
||||
|
||||
ErrorType::TooManyServers { .. } => StatusCode::BAD_REQUEST,
|
||||
ErrorType::TooManyEmbeds { .. } => StatusCode::BAD_REQUEST,
|
||||
|
||||
@@ -47,6 +47,7 @@ impl<'r> Responder<'r, 'static> for Error {
|
||||
ErrorType::InvalidRole => Status::NotFound,
|
||||
ErrorType::Banned => Status::Forbidden,
|
||||
ErrorType::AlreadyInServer => Status::Conflict,
|
||||
ErrorType::CannotTimeoutYourself => Status::BadRequest,
|
||||
|
||||
ErrorType::TooManyServers { .. } => Status::BadRequest,
|
||||
ErrorType::TooManyEmbeds { .. } => Status::BadRequest,
|
||||
|
||||
Reference in New Issue
Block a user