remove OIDC/Postgres, replace ApiError w/ AppError, move params to api-types

This commit is contained in:
2026-07-12 05:14:17 +02:00
parent c0e685a4ee
commit 9b18d3ff6d
42 changed files with 243 additions and 3367 deletions

View File

@@ -29,6 +29,12 @@ pub enum DomainError {
#[error("Forbidden: {0}")]
Forbidden(String),
#[error("Not found: {0}")]
NotFound(String),
#[error("Conflict: {0}")]
Conflict(String),
#[error("Repository error: {0}")]
RepositoryError(String),
@@ -52,12 +58,12 @@ impl DomainError {
pub fn is_not_found(&self) -> bool {
matches!(
self,
DomainError::UserNotFound(_) | DomainError::ChannelNotFound(_)
DomainError::UserNotFound(_) | DomainError::ChannelNotFound(_) | DomainError::NotFound(_)
)
}
pub fn is_conflict(&self) -> bool {
matches!(self, DomainError::UserAlreadyExists(_))
matches!(self, DomainError::UserAlreadyExists(_) | DomainError::Conflict(_))
}
}