Esempio n. 1
0
 def list_flights(self, context, criteria):
     yield flight.FlightInfo(
         pa.schema([]),
         flight.FlightDescriptor.for_path('/foo'),
         [],
         -1, -1
     )
     raise flight.FlightInternalError("foo")
Esempio n. 2
0
 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
Esempio n. 3
0
 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