Skip to content

v0.3.0

Choose a tag to compare

@RAprogramm RAprogramm released this 24 Aug 00:13
· 669 commits to main since this release

Added

  • AppCode — stable machine-readable error code (part of the wire contract).
  • ErrorResponse.code, ErrorResponse.retry, ErrorResponse.www_authenticate fields.
  • Axum/Actix integrations now set Retry-After and WWW-Authenticate headers when applicable.

Changed (breaking)

  • ErrorResponse::new now requires (status: u16, code: AppCode, message: impl Into<String>).

Migration

  • Replace ErrorResponse::new(status, "msg") with
    ErrorResponse::new(status, AppCode::<Variant>, "msg").
  • Optionally use .with_retry_after_secs(...) and/or .with_www_authenticate(...)
    to populate the new fields.