fixed exception catches for get_node expecting KeyError to expect CoreError

This commit is contained in:
Blake Harnden 2019-09-12 15:48:09 -07:00
parent 0db3031b15
commit 32bfa4b2f9
8 changed files with 23 additions and 26 deletions

View file

@ -198,7 +198,7 @@ class CoreGrpcServer(core_pb2_grpc.CoreApiServicer):
def get_node(self, session, node_id, context):
try:
return session.get_node(node_id)
except KeyError:
except CoreError:
context.abort(
grpc.StatusCode.NOT_FOUND, "node {} not found".format(node_id)
)