From 7d7918d6bd5a75d9c61f6217af12f27018618556 Mon Sep 17 00:00:00 2001 From: Joan Fontanals Date: Thu, 21 Sep 2023 22:39:22 +0200 Subject: [PATCH] chore: make message more explicit to see error (#6053) Signed-off-by: Joan Fontanals Martinez --- jina/serve/runtimes/gateway/graph/topology_graph.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jina/serve/runtimes/gateway/graph/topology_graph.py b/jina/serve/runtimes/gateway/graph/topology_graph.py index 942737149c9b7..10c1b41f8327e 100644 --- a/jina/serve/runtimes/gateway/graph/topology_graph.py +++ b/jina/serve/runtimes/gateway/graph/topology_graph.py @@ -80,7 +80,7 @@ def _validate_against_outgoing_nodes(self): if node._pydantic_models_by_endpoint is not None: # gateway end for endp in self._pydantic_models_by_endpoint.keys(): - outgoing_enp = endp + outgoing_endp = endp incoming_endp = ( endp if endp in node._pydantic_models_by_endpoint @@ -91,7 +91,7 @@ def _validate_against_outgoing_nodes(self): if endp in node._pydantic_models_by_endpoint: if ( - self._pydantic_models_by_endpoint[outgoing_enp][ + self._pydantic_models_by_endpoint[outgoing_endp][ 'output' ].schema() != node._pydantic_models_by_endpoint[incoming_endp][ @@ -99,14 +99,14 @@ def _validate_against_outgoing_nodes(self): ].schema() ): raise Exception( - f'The output schema of {self.name} is incompatible with the input schema of {node.name}' + f'The output schema of {self.name} at {outgoing_endp} endpoint is incompatible with the input schema of {node.name} at {incoming_endp} endpoint' ) else: if ( - outgoing_enp != __default_endpoint__ + outgoing_endp != __default_endpoint__ ): # It could happen that there is an Encoder with default followed by an indexer with [index, search] raise Exception( - f'{node.name} does not expose {incoming_endp} which makes it impossible to be chained with {self.name} on {outgoing_enp}' + f'{node.name} does not expose {incoming_endp} which makes it impossible to be chained with {self.name} on {outgoing_endp}' ) else: self.logger.warning(