Skip to main content
Every documented error uses the same three-field JSON envelope:
status mirrors the HTTP status; code is the stable identifier to branch on; message is human-readable detail. Each endpoint page lists exactly which codes it can raise.

Status Classes at a Glance

Provider Errors Are Configuration Errors

Two common 400 codes point at the app’s model setup rather than your request:
  • provider_not_initialize: no valid model credentials
  • completion_request_error: an error occurred while making a completion request
For these errors, retrying won’t help. Fix the app’s model configuration in Dify.

Rate Limits

The 429 code too_many_requests is a concurrency ceiling—too many simultaneous requests for the app right now. Back off and retry.

Errors Inside Streams

Once a stream opens, the HTTP status is already 200: failures arrive as an error event and end the stream. The event’s code values are the same ones documented here—classify them with the same rules. See Consume Streaming Responses for details.

What to Retry

  • Retry with backoff: too_many_requests, 500, and network failures.
  • Don’t retry as-is: validation errors (fix the request first) or authorization failures.
  • Fix, don’t retry: a 404 from a resume call means the wrong user or a run that doesn’t exist. Correct the identifier instead.