klauthed-error 0.1.0

Error kernel for klauthed: the DomainError trait with stable, serializable error codes and categories.
Documentation
  • Coverage
  • 100%
    19 out of 19 items documented1 out of 6 items with examples
  • Size
  • Source code size: 17.84 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 524.95 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Klauthed/rust-libraries
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • klauthedAdmin

klauthed-error

The zero-dependency error kernel for the klauthed crates. It owns only the shared contract — not concrete error types.

  • ErrorCategoryBadRequest / Unauthorized / Forbidden / NotFound / Conflict / RateLimited / Timeout / Unavailable / Internal, with http_status() and is_retryable().
  • ErrorCode — a newtype over Cow<'static, str> following the domain.reason convention (e.g. security.expired_token).
  • DomainError — the trait every crate's error type implements: category() + code(), with http_status() / is_retryable() defaulted from the category.

Concrete error enums live in their own crates (e.g. ConfigError in klauthed-core, SecurityError in klauthed-security) and impl DomainError — usually generated by #[derive(DomainError)] from klauthed-macros. An optional serde feature derives Serialize/Deserialize for the shared types.


Part of the klauthed rust-libraries workspace. Browse the API: cargo doc -p klauthed-error --open.

License

Dual-licensed under MIT or Apache-2.0, at your option.