fixed exception catches for get_node expecting KeyError to expect CoreError
This commit is contained in:
parent
0db3031b15
commit
32bfa4b2f9
8 changed files with 23 additions and 26 deletions
|
@ -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)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue