·error-handling
</>

error-handling

jiatastic/open-python-skills

FastAPI、Pydantic 和 asyncio 的 Python 錯誤處理模式。遵循“讓它崩潰”的理念 - 引發異常,捕獲邊界。涵蓋 HTTPException、全局異常處理程序、驗證錯誤、後台任務失敗。在以下情況下使用:(1) 設計 API 錯誤響應,(2) 處理 RequestValidationError,(3) 管理異步異常,(4) 防止堆棧跟踪洩漏,(5) 設計自定義異常層次結構。

8安裝·0熱度·@jiatastic

安裝

$npx skills add https://github.com/jiatastic/open-python-skills --skill error-handling

SKILL.md

Production-ready error handling for Python APIs using the Let it crash philosophy.

Let it crash - Don't be defensive. Let exceptions propagate naturally and handle them at boundaries.

| Need to retry | tenacity.retry() for transient failures | | Need to transform | Wrap third-party SDK errors as domain errors | | Need to clean up | Use finally or context managers | | Need to add context | raise DomainError(...) from original |

FastAPI、Pydantic 和 asyncio 的 Python 錯誤處理模式。遵循“讓它崩潰”的理念 - 引發異常,捕獲邊界。涵蓋 HTTPException、全局異常處理程序、驗證錯誤、後台任務失敗。在以下情況下使用:(1) 設計 API 錯誤響應,(2) 處理 RequestValidationError,(3) 管理異步異常,(4) 防止堆棧跟踪洩漏,(5) 設計自定義異常層次結構。 來源:jiatastic/open-python-skills。

查看原文

可引用資訊

為搜尋與 AI 引用準備的穩定欄位與指令。

安裝指令
npx skills add https://github.com/jiatastic/open-python-skills --skill error-handling
分類
</>開發工具
認證
收錄時間
2026-02-01
更新時間
2026-02-18

快速解答

什麼是 error-handling?

FastAPI、Pydantic 和 asyncio 的 Python 錯誤處理模式。遵循“讓它崩潰”的理念 - 引發異常,捕獲邊界。涵蓋 HTTPException、全局異常處理程序、驗證錯誤、後台任務失敗。在以下情況下使用:(1) 設計 API 錯誤響應,(2) 處理 RequestValidationError,(3) 管理異步異常,(4) 防止堆棧跟踪洩漏,(5) 設計自定義異常層次結構。 來源:jiatastic/open-python-skills。

如何安裝 error-handling?

開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等) 複製並執行以下指令:npx skills add https://github.com/jiatastic/open-python-skills --skill error-handling 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code 或 Cursor 中使用

這個 Skill 的原始碼在哪?

https://github.com/jiatastic/open-python-skills

詳情

分類
</>開發工具
來源
skills.sh
收錄時間
2026-02-01