Skip to content
This repository was archived by the owner on Jun 3, 2026. It is now read-only.

Fix error message interpolation to use err.message instead of String(err) - #55

Merged
jraylan merged 3 commits into
extendable-extensionfrom
copilot/sub-pr-41
Jan 4, 2026
Merged

Fix error message interpolation to use err.message instead of String(err)#55
jraylan merged 3 commits into
extendable-extensionfrom
copilot/sub-pr-41

Conversation

Copilot AI commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

Addresses feedback on PR #41 to improve error message handling. Using String(err) produces verbose output including stack traces; err.message provides cleaner, more user-friendly error messages.

Changes

  • webviewProvider.ts:1310: Changed error interpolation from String(err) to err.message in settings update handler
  • agent/index.ts:70: Fixed inconsistent error handling introduced in recent refactor
// Before
vscode.window.showErrorMessage(`Failed to update setting: ${err instanceof Error ? String(err) : 'Unknown error'}`);

// After
vscode.window.showErrorMessage(`Failed to update setting: ${err instanceof Error ? err.message : 'Unknown error'}`);

Aligns with existing patterns throughout the codebase (apiService.ts, mcpServer.ts, tools/index.ts).


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 4, 2026 21:45
Co-authored-by: jraylan <23512861+jraylan@users.noreply.github.com>
Co-authored-by: jraylan <23512861+jraylan@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on extensible addon system Fix error message interpolation to use err.message instead of String(err) Jan 4, 2026
Copilot AI requested a review from jraylan January 4, 2026 21:49
@jraylan
jraylan marked this pull request as ready for review January 4, 2026 21:50
@jraylan
jraylan merged commit 3cbc272 into extendable-extension Jan 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants