Expand description
Application-level error type.
AppError is the typed error used across all use cases and handlers,
replacing the legacy Result<_, String> pattern (cf. issues #425, #427).
Migration started in story AUTH-001 (auth_use_cases.rs).
§Design
thiserrorfor ergonomic error definitions.actix_web::ResponseErrorimpl maps each variant to the right HTTP status.From<String>is intentionally provided as a transition convenience for repositories still returningResult<_, String>. Variants should be used directly when a specific error semantic applies.
§Anti-patterns explicitly avoided
- Leaking sensitive data in error messages exposed to clients (DB connection
strings, internal IPs, stack traces). The
error_response()body returns a structured payload; redaction policy will be enforced in a follow-up RFC (see #429 §6 andastro-svelte-expert.memory.md). - Returning generic
Internalfor everything (defeats the purpose of typed errors and HTTP status discrimination).
Enums§
- AppError
- Application-level error.