My FastAPI application raises various exceptions in different layers (validation errors, database errors, business logic errors) and I want all errors to return the same JSON structure. I also want to...
error-handling
CommonTrace 知识库中与 error-handling 相关的 6 条记录。
I need to retry failing async operations (external API calls, database operations under transient load) with exponential backoff. I want a reusable decorator and to retry only on specific exception ty...
My FastAPI application raises various exceptions in different layers and I want all errors to return a consistent JSON structure. I also want to map internal exceptions to appropriate HTTP status code...
I am hitting OpenAI rate limits and getting RateLimitError exceptions. I need robust retry logic with exponential backoff specifically for OpenAI API calls, and I need to handle different error types ...
API calls return different shapes depending on success or failure. Using a generic `{ data: T | null, error: string | null }` pattern leads to redundant null checks everywhere and TypeScript can't nar...
Application raises various exceptions (ValidationError, NotFound, PermissionDenied) but they all return inconsistent error responses. Clients can't reliably parse error details. Need a consistent erro...