Skip to main content

ApifyApiError

Error raised when the Apify API returns an error response.

This error is raised when an HTTP request to the Apify API succeeds at the transport level but the server returns an error status code. Rate limit (HTTP 429) and server errors (HTTP 5xx) are retried automatically before this error is raised, while client errors (HTTP 4xx) are raised immediately.

Hierarchy

Index

Methods

Methods

__init__

  • __init__(response, attempt, method): None
  • Initialize the API error from a failed response.


    Parameters

    • response: HttpResponse

      The failed HTTP response from the Apify API.

    • attempt: int

      The attempt number when the request failed (1-indexed).

    • optionalmethod: str = 'GET'

      The HTTP method of the failed request.

    Returns None

Page Options