Skip to content

fix(update-checker): improve error handling robustness#53

Draft
GOODBOY008 with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-review-comment-suggestion
Draft

fix(update-checker): improve error handling robustness#53
GOODBOY008 with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-review-comment-suggestion

Conversation

Copilot AI commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Two error-handling deficiencies in the update checker's catch block that could hide useful diagnostic information or produce incorrect error categorization.

Changes

  • Non-Error rejection handling: Replace hardcoded 'Failed to check for updates.' fallback with String(caught), preserving actual error details when the Tauri updater plugin rejects with a string or non-Error value — consistent with the String(error) pattern used elsewhere (e.g. App.tsx:566)

  • Proxy validation error matching: Narrow lower.includes('invalid') to lower.includes('invalid update proxy url') — the broad check incorrectly routes unrelated errors (any message containing "invalid") to the "Update verification failed" bucket

// Before
const raw = caught instanceof Error ? caught.message : 'Failed to check for updates.';
// ...
lower.includes('invalid')

// After
const raw = caught instanceof Error ? caught.message : String(caught);
// ...
lower.includes('invalid update proxy url')

Copilot AI changed the title [WIP] Fix code based on review comment fix(update-checker): improve error handling robustness Jul 20, 2026
Copilot AI requested a review from GOODBOY008 July 20, 2026 08:01
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