def METHOD_NAME(e):
    """Exception handler that manages Flask/Werkzeug exceptions.
    For the other exception handlers check ``service/decorators.py``
    """
    # NOTE: add log entry
    str(getattr(e, "code", "unavailable"))
    log_error_code = str(getattr(e, "code", "unavailable"))
    service_log.error(
        f"{request.remote_addr} {request.method} {request.scheme} {request.full_path}\n"
        f"Error code: {log_error_code}\n"
        f"Stack trace: {traceback.format_exc()}"
    )
    # NOTE: craft user messages
    if hasattr(e, "code"):
        code = int(e.code)
        # NOTE: return an http error for methods with no body allowed. This prevents undesired exceptions.
        NO_PAYLOAD_METHODS = "HEAD"
        if request.method in NO_PAYLOAD_METHODS:
            return Response(status=code)
        error: ServiceError
        if code == 400:
            error = ProgramHttpRequestError(e)
        elif code == 404:
            error = ProgramHttpMissingError(e)
        elif code == 405:
            error = ProgramHttpMethodError(e)
        elif code == 408:
            error = ProgramHttpTimeoutError(e)
        else:
            error = ProgramHttpServerError(e, code)
        return error_response(error)
    # NOTE: Werkzeug exceptions should be covered above, the following line is for
    #   unexpected HTTP server errors.
    return error_response(e)