Esempio n. 1
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
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