def METHOD_NAME(e):
    # Ensure we've logged uncaught exceptions
    logger().exception(e)
    # pass through HTTP errors, they are already valid responses for flask.
    if isinstance(e, HTTPException):
        return e
    # convert other remaining to generic 500s.
    return InternalServerError(description="Unknown error", original_exception=e)