summaryrefslogtreecommitdiff
path: root/src/conversation/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'src/conversation/handlers')
-rw-r--r--src/conversation/handlers/create/mod.rs4
-rw-r--r--src/conversation/handlers/delete/mod.rs4
-rw-r--r--src/conversation/handlers/send/mod.rs7
3 files changed, 5 insertions, 10 deletions
diff --git a/src/conversation/handlers/create/mod.rs b/src/conversation/handlers/create/mod.rs
index 2b7fa39..aa77411 100644
--- a/src/conversation/handlers/create/mod.rs
+++ b/src/conversation/handlers/create/mod.rs
@@ -57,9 +57,7 @@ impl IntoResponse for Error {
app::CreateError::InvalidName(_) => {
(StatusCode::BAD_REQUEST, error.to_string()).into_response()
}
- app::CreateError::Name(_) | app::CreateError::Database(_) => {
- Internal::from(error).into_response()
- }
+ app::CreateError::Failed(_) => Internal::from(error).into_response(),
}
}
}
diff --git a/src/conversation/handlers/delete/mod.rs b/src/conversation/handlers/delete/mod.rs
index 231e433..2365303 100644
--- a/src/conversation/handlers/delete/mod.rs
+++ b/src/conversation/handlers/delete/mod.rs
@@ -50,9 +50,7 @@ impl IntoResponse for Error {
app::DeleteError::NotEmpty(_) => {
(StatusCode::CONFLICT, error.to_string()).into_response()
}
- app::DeleteError::Name(_) | app::DeleteError::Database(_) => {
- Internal::from(error).into_response()
- }
+ app::DeleteError::Failed(_) => Internal::from(error).into_response(),
}
}
}
diff --git a/src/conversation/handlers/send/mod.rs b/src/conversation/handlers/send/mod.rs
index ff63652..979dd24 100644
--- a/src/conversation/handlers/send/mod.rs
+++ b/src/conversation/handlers/send/mod.rs
@@ -58,10 +58,9 @@ impl IntoResponse for Error {
SendError::ConversationNotFound(_) | SendError::ConversationDeleted(_) => {
NotFound(error).into_response()
}
- SendError::SenderNotFound(_)
- | SendError::SenderDeleted(_)
- | SendError::Name(_)
- | SendError::Database(_) => Internal::from(error).into_response(),
+ SendError::SenderNotFound(_) | SendError::SenderDeleted(_) | SendError::Failed(_) => {
+ Internal::from(error).into_response()
+ }
}
}
}