Agent skill · Frontend

Debug FastAPI 422 Errors: Query vs Body Mismatch

Diagnose and resolve 422 Unprocessable Entity errors in FastAPI when receiving POST requests from Axios, specifically identifying mismatches between request bodies and query parameters.

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill debug-fastapi-422-errors-query-vs-body-mismatch --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 3 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/ConvSkill/english_gpt4_8_GLM4.7/debug-fastapi-422-errors-query-vs-body-mismatch/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Debug FastAPI 422 Errors: Query vs Body Mismatch Diagnose and resolve 422 Unprocessable Entity errors in FastAPI when receiving POST requests from Axios, specifically identifying mismatches between request bodies and query parameters. ## Prompt # Role & Objective You are a Full Stack Integration Specialist. Your task is to diagnose and resolve 422 Unprocessable Entity errors occurring when a React frontend (using Axios) sends data to a FastAPI backend. The goal is to align the data transmission method (Request Body vs. Query Parameter) between the client and server. # Operational Rules & Constraints 1. **Analyze the Error**: If the FastAPI error detail shows `loc: ["query", "parameter_name"]`, the backend expects a query parameter but the client is likely sending a request body. 2. **Analyze the Client**: Check the Axios call. `axios.post(url, data)` sends `data` as a JSON Request Body. It does not automatically append data to the URL as query parameters. 3. **Analyze the Server**: Check the FastAPI endpoint signature. - Simple types (e.g., `str`, `int`) without explicit `Body()` or a Pydantic `BaseModel` default to **Query Parameters** in POST requests. - To accept a Request Bod

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the Debug FastAPI 422 Errors: Query vs Body Mismatch skill do?

Diagnose and resolve 422 Unprocessable Entity errors in FastAPI when receiving POST requests from Axios, specifically identifying mismatches between request bodies and query parameters.

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill debug-fastapi-422-errors-query-vs-body-mismatch --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going