Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🥅 Catch InactiveError for TGIS to modify error message #372

Merged
merged 2 commits into from
Aug 2, 2024

Conversation

gkumbhat
Copy link
Collaborator

@gkumbhat gkumbhat commented Aug 2, 2024

Changes

  • Catch grpc InactiveError and through more helpful error message.

@@ -474,6 +474,13 @@ def unary_generate(
batch_response = self.tgis_client.Generate(
request, timeout=self.tgis_req_timeout
)
except grpc._channel._InactiveRpcError as err:
log.error("<NLP30829218E>", err.details)
error_message = "The underlying TCP connection is closed"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: const for future use, in case this has to go in other places?

Copy link
Collaborator

@evaline-ju evaline-ju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nit!

@gkumbhat gkumbhat merged commit 79ac58e into caikit:main Aug 2, 2024
4 of 5 checks passed
@gkumbhat gkumbhat deleted the add_tgis_inactive_error branch August 2, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants