refactor: add DomainError::Forbidden + centralize error-to-HTTP mapping
Ownership checks (delete_review, confirm/dismiss watch events) now return Forbidden instead of Unauthorized. Presentation layer maps DomainError→StatusCode via domain_error_response helper, replacing verbose per-handler match arms.
This commit is contained in:
@@ -16,4 +16,7 @@ pub enum DomainError {
|
||||
|
||||
#[error("Unauthorized: {0}")]
|
||||
Unauthorized(String),
|
||||
|
||||
#[error("Forbidden: {0}")]
|
||||
Forbidden(String),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user