Skip to main content
Version: Next

InvalidResponseBodyError

Error raised when a response body cannot be parsed.

This occurs when the API returns a body that does not match its content type, for example a malformed JSON document. It is raised on a response the client already accepted, so it is not retried - a transfer that breaks mid-body surfaces as a transport error inside the retry loop instead.

Hierarchy

Index

Methods

Methods

__init__

  • __init__(response): None
  • Initialize the error from an unparsable response.


    Parameters

    • response: HttpResponse

      The HTTP response whose body could not be parsed.

    Returns None

Page Options