def list_flights(self, context, criteria): yield flight.FlightInfo( pa.schema([]), flight.FlightDescriptor.for_path('/foo'), [], -1, -1 ) raise flight.FlightInternalError("foo")
def do_action(self, context, action): if action.type == "internal": raise flight.FlightInternalError("foo") elif action.type == "timedout": raise flight.FlightTimedOutError("foo") elif action.type == "cancel": raise flight.FlightCancelledError("foo") elif action.type == "unauthenticated": raise flight.FlightUnauthenticatedError("foo") elif action.type == "unauthorized": raise flight.FlightUnauthorizedError("foo") raise NotImplementedError
def do_action(self, context, action): if action.type == "internal": raise flight.FlightInternalError("foo") elif action.type == "timedout": raise flight.FlightTimedOutError("foo") elif action.type == "cancel": raise flight.FlightCancelledError("foo") elif action.type == "unauthenticated": raise flight.FlightUnauthenticatedError("foo") elif action.type == "unauthorized": raise flight.FlightUnauthorizedError("foo") elif action.type == "protobuf": err_msg = b'this is an error message' raise flight.FlightUnauthorizedError("foo", err_msg) raise NotImplementedError