Skip to content

Error Handling

The URL Media Inspector API follows standard HTTP status codes and returns a structured error format.

Error Response Format

When an error occurs, the API returns a standardized JSON structure.

json
{
  "status": "error",
  "error": {
    "code": "ERROR_CODE_HERE",
    "message": "Human readable error description."
  }
}

Common Error Codes

HTTP StatusError CodeDescription
400INVALID_URLThe provided URL string was malformed.
400INVALID_PAYLOADThe request body did not match the expected schema.
403SSRF_BLOCKEDThe resolved IP address maps to an internal subnet.
404RESOURCE_NOT_FOUNDThe remote server returned a 404 response.
408UPSTREAM_TIMEOUTThe remote server took too long to respond.
413PAYLOAD_TOO_LARGEThe remote file exceeds the configured size limit.
502BAD_GATEWAYThe remote server returned an invalid or unparseable response.

Technical Notes

  • Client errors (4xx) generally indicate an issue with the provided URL or payload.
  • Upstream errors (like timeouts or 502) indicate an issue with the target remote server, not the media inspector infrastructure.

Infrastructure Documentation — Behavior-Driven, Schema-Governed