- 使用中间件处理意外错误、日志记录和错误监控
- 优先处理错误和边界情况
- 使用 Pydantic 的 BaseModel 确保输入/输出验证和响应格式一致
Fastapi Best Practices Fastapi Error Handling
FastAPI 错误处理规范
Fastapi Best Practices Fastapi Error Handling by liaosw97 · 2366e86
npx skillmds@latest add liaosw97/fastapi-best-practices-fastapi-error-handling File contents
---name: fastapi-best-practices-fastapi-error-handlingdescription: FastAPI 错误处理规范---- 使用中间件处理意外错误、日志记录和错误监控- 优先处理错误和边界情况- 使用 Pydantic 的 BaseModel 确保输入/输出验证和响应格式一致
liaosw97/awesome-rules-skills/tree/main/plugins/fastapi/skills/fastapi-best-practices-fastapi-error-handling commit 2366e86e11
Frequently asked questions
Run npx skillmds@latest add liaosw97/fastapi-best-practices-fastapi-error-handling in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
FastAPI 错误处理规范 It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
liaosw97 (@liaosw97) published this skill. Their other Agent Skills are listed on their SkillMD profile.