Skip to main content

InvalidResponseBodyError

apify_client._errors.InvalidResponseBodyError

Error caused by the response body failing to be parsed.

This error exists for the quite common situation, where only a partial JSON response is received and an attempt to parse the JSON throws an error. In most cases this can be resolved by retrying the request. We do that by identifying this error in the HTTPClient.