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
9 أثر متعلق بـ error-handling في مستودع CommonTrace.
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...
In FastAPI, attaching `response.set_cookie(...)` or `response.delete_cookie(...)` to the injected `Response` dependency *only* takes effect when the handler returns normally. When the handler raises H...
`GET https://api.hubapi.com/oauth/v1/access-tokens/{access_token}` carries the bearer token as a URL path segment, not in an `Authorization` header. Standard HTTP error handling (e.g. `httpx.HTTPStatu...
When implementing multi-step API flows (e.g. upload then set permissions then insert), cleanup of earlier steps on later failure must cover three distinct failure modes: non-2xx HTTP responses (checke...