def METHOD_NAME(cls, response: requests.models.Response) -> str:
    error_msg = ""
    try:
        error_msg = response.json()["message"]
    except (json.JSONDecodeError, KeyError):
        error_msg = response.text if response.text else response.reason
    return error_msg