예제 #1
0
 def handle_exception(exception):
     return fail(500, str(exception))
예제 #2
0
def handle_405_error(err):
    return fail(405, "Method not allowed.")
예제 #3
0
def handle_http_exception(exception):
    return fail(exception.code, exception.message, exception.meta)
예제 #4
0
def handle_validation_error(err):
    messages = [(name, msg[0])
                for name, msg in err.data["messages"].iteritems()]
    name, message = messages[0]
    return fail(422, message, {"field": name})
예제 #5
0
def handle_404_error(err):
    return fail(404, "Page not found.")
예제 #6
0
파일: web.py 프로젝트: adriancooney/examist
 def handle_exception(exception):
     return fail(500, str(exception))
예제 #7
0
파일: web.py 프로젝트: adriancooney/examist
def handle_http_exception(exception):
    return fail(exception.code, exception.message, exception.meta)
예제 #8
0
파일: web.py 프로젝트: adriancooney/examist
def handle_405_error(err):
    return fail(405, "Method not allowed.")
예제 #9
0
파일: web.py 프로젝트: adriancooney/examist
def handle_404_error(err):
    return fail(404, "Page not found.")
예제 #10
0
파일: web.py 프로젝트: adriancooney/examist
def handle_validation_error(err):
    messages = [(name, msg[0]) for name, msg in err.data["messages"].iteritems()]
    name, message = messages[0]
    return fail(422, message, { "field": name })