axum-errors-extractor-rejections
OfficialTurn extractor failures into correct JSON errors.
Software Engineering#axum#extractor rejection#json error response#withrejection#fromrequest derive#axum 0.8 migration#non_exhaustive
AuthorImpertio-Studio
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill helps you control how Axum converts extractor failures into HTTP responses so clients get the right status codes and error bodies instead of default plain text or incorrect “invented” responses.
Core Features & Use Cases
- Custom rejection shaping for failed extractors: Replace the default plain-text rejection with a unified API error payload for
Json,Path,Query,Form, and other built-in extractors. - Safe, version-aware handling for Axum 0.7 vs 0.8: Prevent surprises from the
Option<T>behavior change in Axum 0.8 by using the correct approach (Result<T, T::Rejection>when needed). - Correct error mapping patterns: Use the recommended techniques—
Result<Extractor, Rejection>,WithRejection, or#[derive(FromRequest)]withrejection(...)—while enforcing required rules like_ =>catch-alls for#[non_exhaustive]enums and reusingrejection.status()/rejection.body_text().
Quick Start
Use the axum-errors-extractor-rejections skill to map a failing Json<T> extractor into a JSON API error response with the status and message derived from the rejection.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: axum-errors-extractor-rejections Download link: https://github.com/Impertio-Studio/Axum-Claude-Skill-Package/archive/main.zip#axum-errors-extractor-rejections Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.