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