BYOK: Show error message when there is no provider#2714
Merged
vijayupadya merged 2 commits intomainfrom Jan 5, 2026
Merged
Conversation
added 2 commits
January 5, 2026 12:53
lramos15
approved these changes
Jan 5, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves error handling in the BYOK (Bring Your Own Key) feature by adding user-visible error messages when a BYOK provider is not available, instead of failing silently.
Key Changes
- Added error handling with user notification when a BYOK provider is undefined in the
manageBYOKcommand - Simplified conditional logic after the early return check
Comment on lines
+46
to
+53
| if (!provider) { | ||
| this._logService.warn(`BYOK: Provider ${vendor} not registered; BYOK may be disabled for this account or environment.`); | ||
| void window.showInformationMessage( | ||
| `The "${vendor}" BYOK provider isn't available in this environment. ` + | ||
| 'This can happen if BYOK is not enabled for your account or this GitHub instance.' | ||
| ); | ||
| return; | ||
| } |
There was a problem hiding this comment.
The error handling for missing providers is inconsistent between the two commands in this file. The manageBYOK command now shows a user-facing message and uses warn level logging, while the manageBYOKAPIKey command (lines 67-69) only logs an error without showing any user message. Consider showing a similar informational message to users in the manageBYOKAPIKey command for consistency.
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.
If BYOK provider is undefined, currently it fails silently and there is no indicator to the user.
This change adds log and shows msg.