1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! A tiny, framework-agnostic error envelope for HTTP APIs.
//!
//! This crate provides a structured error envelope that standardizes
//! error responses across HTTP services with fields for:
//! - Stable machine-readable codes
//! - Human-readable messages
//! - Structured details
//! - Trace IDs for debugging
//! - Retry signals for resilience
//!
//! # Example
//!
//! ```rust
//! use error_envelope::{Error, Code};
//!
//! let err = Error::not_found("User not found")
//! .with_details(serde_json::json!({"user_id": "123"}))
//! .with_trace_id("abc-def-123");
//!
//! assert_eq!(err.code, Code::NotFound);
//! assert_eq!(err.status, 404);
//! ```
pub use Code;
pub use Error;
pub use *;