feat(domain): errors and value objects

This commit is contained in:
2026-05-14 03:16:22 +02:00
parent 63a7001165
commit 94a3f414e4
3 changed files with 137 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
use thiserror::Error;
#[derive(Debug, Error, Clone)]
pub enum DomainError {
#[error("not found")]
NotFound,
#[error("unauthorized")]
Unauthorized,
#[error("forbidden")]
Forbidden,
#[error("conflict: {0}")]
Conflict(String),
#[error("invalid input: {0}")]
InvalidInput(String),
#[error("internal error: {0}")]
Internal(String),
}