Beispiel #1
0
def handle_exception(request, exception):
    return json(jsonapi.error(exception, 'Unexpected Behavior'),
                status=HTTPStatus.BAD_REQUEST)
Beispiel #2
0
def handle_resource_not_found(request, exception):
    return json(jsonapi.error(exception, 'Resource not found'),
                status=HTTPStatus.NOT_FOUND)
Beispiel #3
0
def handle_exchange_error(request, exception):
    return json(jsonapi.error(exception, 'Exchange Error'),
                status=HTTPStatus.UNPROCESSABLE_ENTITY)
Beispiel #4
0
def handle_invalid_order(request, exception):
    return json(jsonapi.error(exception, 'Min Order Amount'),
                status=HTTPStatus.NOT_ACCEPTABLE)
Beispiel #5
0
def handle_invalid_order(request, exception):
    return json(jsonapi.error(exception, 'Invalid Order'),
                status=HTTPStatus.UNPROCESSABLE_ENTITY)
Beispiel #6
0
def handle_order_not_found(request, exception):
    return json(jsonapi.error(exception, 'Order Not Found'),
                status=HTTPStatus.NOT_FOUND)