From 6ee010cb8793bd605f316700e1388edd61067898 Mon Sep 17 00:00:00 2001 From: RA <70325462+RAprogramm@users.noreply.github.com> Date: Thu, 11 Sep 2025 14:45:31 +0700 Subject: [PATCH] docs: sync changelog with recent mappings --- CHANGELOG.md | 10 ++++++++++ README.md | 1 + 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 027a43e..8341cc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,16 @@ All notable changes to this project will be documented in this file. - `AppError::log` now includes the stable `code` field alongside `kind`. - `AppError` stores messages as `Cow<'static, str>` to avoid unnecessary allocations. +### Documentation +- Clarified how `config::ConfigError` converts into `AppErrorKind::Config`. +- Documented that `MultipartError` maps to `AppErrorKind::BadRequest` in the Axum adapter. + +### Tests +- Added unit test verifying `config::ConfigError` mapping. +- Added Axum test asserting `MultipartError` becomes `AppErrorKind::BadRequest` and preserves the message. +- Expanded Actix test to check JSON body and `Retry-After`/`WWW-Authenticate` headers. +- Covered fallback classification of unknown messages as `TurnkeyErrorKind::Service`. + ## [0.3.3] - 2025-09-11 ### Added - `ErrorResponse::status_code()` exposing validated `StatusCode`. diff --git a/README.md b/README.md index 5e40ba1..f51fbb7 100644 --- a/README.md +++ b/README.md @@ -186,6 +186,7 @@ utoipa = "5" - `sqlx::Error` → NotFound/Database - `redis::RedisError` → Cache - `reqwest::Error` → Timeout/Network/ExternalApi +- `axum::extract::multipart::MultipartError` → BadRequest - `validator::ValidationErrors` → Validation - `config::ConfigError` → Config - `tokio::time::error::Elapsed` → Timeout