Skip to main content
When a request fails due to infrastructure-level issues rather than model validation, the platform returns a structured error response with a machine-readable error_type field. These errors cover timeouts, runner crashes, scheduling failures, and connection problems that occur before or during request processing. Request errors use a different response format than model validation errors. Model errors return a detail array of typed error objects. Request errors return a flat object with detail as a human-readable string and error_type as a machine-readable category. The same value is also available in the X-Fal-Error-Type response header for programmatic access without parsing the body.

Response Structure

PropertyDescription
detailA human-readable description of the error.
error_typeA machine-readable string identifying the error category (see table below).
{
  "detail": "Request timed out",
  "error_type": "request_timeout"
}
The X-Fal-Error-Type response header contains the same value as error_type.

Error Type Reference

Error TypeDescriptionTypical Status Code
request_timeoutThe request exceeded the allowed processing time.504
startup_timeoutThe runner did not start within the allowed time.504
runner_scheduling_failureNo runner could be allocated to handle the request.503
runner_connection_timeoutThe connection to the runner timed out.503
runner_disconnectedThe runner disconnected unexpectedly during processing.503
runner_connection_refusedThe runner refused the connection.503
runner_connection_errorA general connection error occurred with the runner.503
runner_incomplete_responseThe runner sent an incomplete response payload.502
runner_server_errorThe runner encountered an internal server error.500
client_disconnectedThe client closed the connection before the response was sent.499
client_cancelledThe request was cancelled by the client.499
bad_requestThe request was malformed (e.g., invalid timeout header).400
internal_errorAn unexpected internal error occurred.500

Handling Request Errors

For retry logic: Use error_type to decide whether to retry. Runner and timeout errors (e.g., runner_connection_timeout, startup_timeout) are typically transient and worth retrying. Client errors (client_disconnected, bad_request) should not be retried. See Retries and Error Handling for how the platform handles retries automatically. For monitoring: The error_type is also available in queue status responses for failed requests, making it useful for tracking failure patterns in your analytics dashboard.