Templates / flowchart

API error handling flow

Retry-with-backoff logic for external API calls, separating retryable errors from hard failures.

Open in studio

Preview

Mermaid 11 renderer

Rendering preview...

Mermaid source

flowchart

flowchart TD
    request[Call external API] --> ok{2xx response?}
    ok -->|yes| parse[Parse payload]
    ok -->|no| type{Error type}
    type -->|429 / 5xx| retry[Retry with backoff]
    type -->|4xx| alert[Log + alert]
    retry --> limit{Attempts left?}
    limit -->|yes| request
    limit -->|no| alert
    parse --> done[Continue pipeline]
    alert --> fallback[Serve cached fallback]

More templates