Add get_tls_connection_error_elaboration to allow clients to get more descriptive errors - #14
Merged
alexdubois-ni merged 1 commit intoAug 25, 2026
Conversation
…place grpc::unavailable error descriptions with an NI one that mentions that the reasoning maybe NI-TLS related
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Pull request overview
Adds opt-in TLS connection error elaboration for channels created by NI-TLS configuration.
Changes:
- Tags created gRPC channels for later identification.
- Adds and exports connection-error elaboration.
- Refactors audit tagging and adds unit tests.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/nitlsconfig/channel_tag.py |
Implements channel tagging and lookup. |
src/nitlsconfig/errors.py |
Adds TLS connection error elaboration. |
src/nitlsconfig/grpc_channel.py |
Tags created channels. |
src/nitlsconfig/audit.py |
Uses shared channel-tag utilities. |
src/nitlsconfig/__init__.py |
Exports the new API. |
tests/unit/test_channel_tag.py |
Tests channel tagging. |
tests/unit/test_errors.py |
Tests elaboration behavior. |
tests/unit/test_grpc_channel.py |
Verifies created channels are tagged. |
tests/unit/test_audit.py |
Updates audit tests for the refactor. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Test Results 12 files ± 0 12 suites ±0 17s ⏱️ +2s Results for commit c9cdcd0. ± Comparison against base commit 64a21d5. This pull request removes 1 and adds 7 tests. Note that renamed tests count towards both. |
ckoellin
approved these changes
Aug 25, 2026
alexdubois-ni
deleted the
users/adubois/addElaborationExtractionMechanismForClients
branch
August 25, 2026 16:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add get_tls_connection_error_elaboration to allow clients to get more descriptive errors
What does this Pull Request accomplish?
Adds a new get_tls_connection_error_elaboration that returns a more useful error elaboration for diagnosing gRPC unavailable errors when NI-TLS is in the equation.
Why should this Pull Request be merged?
As of today, users will get a very generic unavailable status from gRPC. We want to re-interpret this into something more useful, but clients will need to call this new get_tls_connection_error_elaboration explicitly themselves to accomplish this.
When clients prompt for this elaboration with this function, they will have this error essentially toggled off/on depending on whether the nitlsconfig python package flagged that it was a first-class created grpc device channel from our nitlsconfig python package. If it is not a nitlsconfig created channel (e.g. a standard insecure or secure channel created by a user), then they will proceed with normal errors as they deem it.
What testing has been done?
Unit tests.