ERR::SCRAPE::BAD_UPSTREAM_RESPONSE

Upstream respond with http code >= 299. See all errors

HTTP Status code relate the state of the service. Forwarding you the upstream response code as our api response code is a non sense, it will create confusion & complexity between regular Scrapfly error and do not represent the correct current state of our service. For simplicity of client-side implementation, we decided to treat bad upstream response code as regular error with same structure and answer with a 200. Not conventional but we think it's the best solution
  • Retryable: No
  • HTTP status code: 200

Error Response Structure Example

openapi openapi Scrape API Error | Json
            {
    "config": { ... },
    "context": { ... },
    "result": {
        [...],
        "status": "DONE",
        "success": false,
        "reason": null,
        "error": {
            "http_code": 200,
            "code": "ERR::SCRAPE::BAD_UPSTREAM_RESPONSE",
            "description": "Upstream respond with http code >= 299",
            "error_id": "9993a546-b899-4927-b788-04f5c4e473d5",
            "message": "Useful hint with details about your error",
            "scrape_id": "7c61352c-f1a7-4ea6-a0b8-198d7ac6fe1a",
            "retryable": false,
            "doc_url": "https://scrapfly.local/docs/scrape-api/error/ERR::SCRAPE::BAD_UPSTREAM_RESPONSE"
        },
        [...],
    }
}

        

Suggested content