Templates / flowchart
API error handling flow
Retry-with-backoff logic for external API calls, separating retryable errors from hard failures.
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
flowchartArchitecture
Microservices architecture
A service map with an API gateway, core services, and shared infrastructure. A solid starting point for README architecture sections.
sequenceDiagramProcess
User login sequence
A login flow with token issuance and a failure branch. Useful for documenting auth endpoints and session behavior.
stateDiagram-v2Process
Order state machine
Lifecycle states for an e-commerce order, from creation to fulfillment, with cancellation and refund paths.