def METHOD_NAME(func):
    @functools.wraps(func)
    def _log_response_error(*args, **kwargs):
        response = func(*args, **kwargs)
        LOGGER.log(
            logging.ERROR if response.status_code >= 500 else logging.INFO,
            "Handling exception (status code %s): %s",
            response.status_code,
            response.get_json(),
            exc_info=response.status_code >= 500,
        )
        return response
    return _log_response_error