Skip to content

Commit

Permalink
Handle exception from an edge that is not in the cached edges
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsenht committed Oct 8, 2024
1 parent 4aeb888 commit 970a35a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def get_edges(self, pairs, arax_response):
if cached_nodes[1] in self.knowledge_graph['nodes']:
knowledge_graph['nodes'][cached_nodes[1]] = self.knowledge_graph['nodes'][cached_nodes[1]]
for edge in list_of_edges:
knowledge_graph['edges'][edge] = self.knowledge_graph['edges'][edge]
if edge in self.knowledge_graph['edges']:
knowledge_graph['edges'][edge] = self.knowledge_graph['edges'][edge]
return knowledge_graph
except Exception as e:
arax_response.warning(f"Cannot retrieve {query} from plover DB with url: {url}, Error: {e}")
Expand Down

0 comments on commit 970a35a

Please sign in to comment.