@app.errorhandler(405)
def method_not_allowed(e):
    logging.error("Method Not Allowed")
    return error(status=405, detail="Method Not Allowed")