Skip to content

Releases: RAprogramm/masterror

v0.5.4

20 Sep 11:50

Choose a tag to compare

Fixed

  • Template parser mirrors thiserror's formatter trait detection, ensuring
    :?, :x, :X, :p, :b, :o, :e and :E specifiers resolve to the
    appropriate TemplateFormatter variant while still flagging unsupported
    flags precisely.

Tests

  • Added parser-level unit tests that cover every supported formatter specifier
    and assert graceful failures for malformed format strings.

v0.5.2

20 Sep 11:50

Choose a tag to compare

Fixed

  • Added a workspace deny.toml allow-list for MIT, Apache-2.0 and Unicode-3.0
    licenses so cargo deny accepts existing dependencies.
  • Declared SPDX license expressions for the internal masterror-derive and
    masterror-template crates to avoid unlicensed warnings.

v0.5.1

20 Sep 11:50

Choose a tag to compare

Changed

  • Replaced the optional sqlx dependency with sqlx-core so enabling the
    feature no longer pulls in rsa via the MySQL driver, fixing the
    RUSTSEC-2023-0071 advisory reported by cargo audit.

Security

  • Added cargo audit to the pre-commit hook and CI workflow; published a
    README badge to surface the audit status.

Added

  • Composite GitHub Action (.github/actions/cargo-deny) that installs and runs
    cargo-deny checks for reuse across workflows.
  • cargo deny step in the reusable CI pipeline to catch advisories, bans,
    license and source issues automatically.
  • README badges surfacing the Cargo Deny status so consumers can quickly verify
    supply-chain checks.

v0.5.0

18 Sep 01:21

Choose a tag to compare

Added

  • Re-exported thiserror::Error as masterror::Error, making it possible to
    derive domain errors without an extra dependency. The derive supports
    #[from] conversions, validates #[error(transparent)] wrappers, and mirrors
    thiserror's ergonomics.
  • Added BrowserConsoleError::context() for retrieving browser-provided
    diagnostics when console logging fails.

Changed

  • README generation now pulls from crate metadata via the build script while
    staying inert during cargo package, preventing dirty worktrees in release
    workflows.

Documentation

  • Documented deriving custom errors via masterror::Error and expanded the
    browser console section with context-handling guidance.
  • Added a release checklist and described the automated README sync process.

Tests

  • Added regression tests covering derive behaviour (including #[from] and
    transparent wrappers) and ensuring the README stays in sync with its
    template.
  • Added a guard test that enforces the AppResult<_> alias over raw
    Result<_, AppError> usages within the crate.

v0.4.0

16 Sep 11:05
61452cb

Choose a tag to compare

Added

  • Optional frontend feature:
    • Converts [AppError] and [ErrorResponse] into wasm_bindgen::JsValue for browser contexts.
    • Logs structured errors to the browser console via console.error.
  • BrowserConsoleError and BrowserConsoleExt API for WASM front-ends.

Documentation

  • Documented browser/WASM support and console logging workflow in the README and crate docs.

v0.3.5

12 Sep 06:49
1d983dd

Choose a tag to compare

Added

  • Conversion from teloxide_core::RequestError into AppError (feature teloxide).

v0.3.3

11 Sep 08:35

Choose a tag to compare

Added

  • ErrorResponse::status_code() exposing validated StatusCode.
  • ErrorResponse::new now checks the supplied status code.

Changed

  • Preserve original reqwest timeout error text.
  • Redis errors map to AppErrorKind::Cache.
  • Dependencies updated.

Fixed

  • Axum and Actix adapters reuse status_code() to avoid type mismatches.

Documentation

  • Clarified contains_nocase and ascii_lower comments.

v0.3.2

08 Sep 01:51

Choose a tag to compare

Added

  • New feature flag turnkey:
    • Provides TurnkeyErrorKind (stable taxonomy of Turnkey-specific failures).
    • Provides TurnkeyError (kind + public message).
    • Adds classify_turnkey_error helper for mapping raw SDK/provider messages.
    • Includes conversions into AppError / AppErrorKind.

Notes

  • Feature is framework-agnostic; no extra dependencies are pulled.

v0.3.1

25 Aug 08:34

Choose a tag to compare

Added

  • Implemented axum::response::IntoResponse for AppError (behind the axum feature).
    This allows using AppError directly as a rejection type in Axum extractors and handlers.

Notes

  • The implementation delegates to ErrorResponse to ensure a single, stable wire contract.

v0.3.0

24 Aug 00:13

Choose a tag to compare

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.