This does not happen on local configuration, just when going through Cloudflare.
The Django code:
error = JsonResponse()
if error is not None:
response.status_code = 400
response.reason_phrase = “Custom defined error message”