alien-error
Structured error library for the Alien platform. Every error carries machine-readable metadata: code, retryable, internal, and http_status_code.
Why Not thiserror or anyhow?
- Structured metadata — errors carry code, retryable, internal, and HTTP status fields for API responses and retry logic
- Error chaining with context — like
anyhow, but each layer preserves structured metadata - API-ready — errors serialize to JSON; the
internalflag controls whether sensitive details reach external clients - Inheritance —
retryableandinternalcan inherit from source errors
Core Types
AlienErrorDatatrait — metadata interface for error enumsAlienError<T>— generic error container with source chain, context, hintsContext/IntoAlienError— extension traits for error propagation
Features
openapi— OpenAPI schema generationaxum—IntoResponsewithinto_internal_response()/into_external_response()anyhow— Interop with theanyhowcrate
See the workspace CLAUDE.md for detailed error design and usage guidelines.