Skip to main content

RedirectCycleError

The test client has been asked to follow a redirect loop.

Attributes

AttributeTypeDescription
last_response[HttpResponse](../../http/response/httpresponse.md?sid=django_http_response_httpresponse)The final response object received before the redirect cycle was detected.
redirect_chainlistA list of URLs and status codes representing the sequence of redirects followed prior to the error.

Constructor

Signature

def RedirectCycleError(
message: string,
last_response: Response
) - > null

Parameters

NameTypeDescription
messagestringThe error message describing the redirect cycle.
last_responseResponseThe last response object received before the cycle was detected, containing the redirect chain.

Signature

def RedirectCycleError(
message: string,
last_response: [HttpResponse](../../http/response/httpresponse.md?sid=django_http_response_httpresponse)
) - > null

Parameters

NameTypeDescription
messagestringThe error message describing the nature of the redirect cycle.
last_response[HttpResponse](../../http/response/httpresponse.md?sid=django_http_response_httpresponse)The final response object received before the cycle was detected, used to extract the redirect chain.