Releases: RAprogramm/masterror
Releases · RAprogramm/masterror
v0.5.4
Fixed
- Template parser mirrors
thiserror's formatter trait detection, ensuring
:?,:x,:X,:p,:b,:o,:eand:Especifiers resolve to the
appropriateTemplateFormattervariant 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
Fixed
- Added a workspace
deny.tomlallow-list for MIT, Apache-2.0 and Unicode-3.0
licenses socargo denyaccepts existing dependencies. - Declared SPDX license expressions for the internal
masterror-deriveand
masterror-templatecrates to avoid unlicensed warnings.
v0.5.1
Changed
- Replaced the optional
sqlxdependency withsqlx-coreso enabling the
feature no longer pulls inrsavia the MySQL driver, fixing the
RUSTSEC-2023-0071advisory reported bycargo audit.
Security
- Added
cargo auditto 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-denychecks for reuse across workflows. cargo denystep 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
Added
- Re-exported
thiserror::Errorasmasterror::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 duringcargo package, preventing dirty worktrees in release
workflows.
Documentation
- Documented deriving custom errors via
masterror::Errorand 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
Added
- Optional
frontendfeature:- Converts [
AppError] and [ErrorResponse] intowasm_bindgen::JsValuefor browser contexts. - Logs structured errors to the browser console via
console.error.
- Converts [
BrowserConsoleErrorandBrowserConsoleExtAPI for WASM front-ends.
Documentation
- Documented browser/WASM support and console logging workflow in the README and crate docs.
v0.3.5
Added
- Conversion from
teloxide_core::RequestErrorintoAppError(featureteloxide).
v0.3.3
Added
ErrorResponse::status_code()exposing validatedStatusCode.ErrorResponse::newnow checks the supplied status code.
Changed
- Preserve original
reqwesttimeout 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_nocaseandascii_lowercomments.
v0.3.2
Added
- New feature flag
turnkey:- Provides
TurnkeyErrorKind(stable taxonomy of Turnkey-specific failures). - Provides
TurnkeyError(kind + public message). - Adds
classify_turnkey_errorhelper for mapping raw SDK/provider messages. - Includes conversions into
AppError/AppErrorKind.
- Provides
Notes
- Feature is framework-agnostic; no extra dependencies are pulled.
v0.3.1
Added
- Implemented
axum::response::IntoResponseforAppError(behind theaxumfeature).
This allows usingAppErrordirectly as a rejection type in Axum extractors and handlers.
Notes
- The implementation delegates to
ErrorResponseto ensure a single, stable wire contract.
v0.3.0
Added
AppCode— stable machine-readable error code (part of the wire contract).ErrorResponse.code,ErrorResponse.retry,ErrorResponse.www_authenticatefields.- Axum/Actix integrations now set
Retry-AfterandWWW-Authenticateheaders when applicable.
Changed (breaking)
ErrorResponse::newnow 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.