exception documentation

HTTP redirection is occurring endlessly.

Method __init__ Initializes an infinite redirection exception.
Instance Variable location The first URL in the series of redirections which was not followed.
Instance Variable message Undocumented

Inherited from Error:

Method __str__ Undocumented
Instance Variable response A complete HTML document for an error page.
Instance Variable status Refers to an HTTP status code, for example http.NOT_FOUND.
def __init__(self, code: int | bytes, message: bytes | None = None, response: bytes | None = None, location: bytes | None = None): (source)

Initializes an infinite redirection exception.

Parameters
code:int | bytesRefers to an HTTP status code, for example http.NOT_FOUND. If no message is given, code is mapped to a descriptive string that is used instead.
message:bytes | NoneA short error message, for example b"NOT FOUND".
response:bytes | NoneA complete HTML document for an error page.
location:bytes | NoneThe location response-header field value. It is an absolute URI used to redirect the receiver to a location other than the Request-URI so the request can be completed.

The first URL in the series of redirections which was not followed.