himanshukukreja
10/24/2023, 6:35 AMGeneralErrorResponse
class:
try:
result = await original_emailpassword_sign_in_post(form_fields, tenant_id, api_options, user_context)
except Exception as e:
logger.error(e)
return GeneralErrorResponse(f"Internal Server Error:- {str(e)}")
`
However, this results in a response like:
{
"status": "GENERAL_ERROR",
"message": "Internal Server Error:- User hi101903252@gmail.com is suspended"
}
The challenge is that this response always carries a status code of 200. I am looking for a way to customize this response's status code based on the specific error encountered, rather than always receiving a 200 status code.