# InvalidResponseBodyError<!-- -->

Error raised when a response body cannot be parsed.

This typically occurs when the API returns a partial or malformed JSON response, for example due to a network interruption. The client retries such requests automatically, so this error is only raised after all retry attempts have been exhausted.

### Hierarchy

* [ApifyClientError](https://docs.apify.com/api/client/python/reference/class/ApifyClientError)
  * *InvalidResponseBodyError*

## Index[**](#Index)

### Methods

* [**\_\_init\_\_](https://docs.apify.com/sdk/python/sdk/python/reference/class/InvalidResponseBodyError.md#__init__)

## Methods<!-- -->[**](#Methods)

### [**](#__init__)[**](https://github.com/apify/apify-sdk-python/blob/b216cff988b3dc02e3b17a3d553d3e35801c6799//src/apify_client/errors.py#L144)\_\_init\_\_

* ****\_\_init\_\_**(response): None

- Initialize the error from an unparsable response.

  ***

  #### Parameters

  * ##### response: [HttpResponse](https://docs.apify.com/api/client/python/reference/class/HttpResponse)

    The HTTP response whose body could not be parsed.

  #### Returns None
