Skip to content

refactor(desktop): improve error handling and translation in server error formatting#16171

Merged
adamdotdevin merged 1 commit intoanomalyco:devfrom
OpeOginni:fix/desktop-model-error-parsing
Mar 5, 2026
Merged

refactor(desktop): improve error handling and translation in server error formatting#16171
adamdotdevin merged 1 commit intoanomalyco:devfrom
OpeOginni:fix/desktop-model-error-parsing

Conversation

@OpeOginni
Copy link
Contributor

@OpeOginni OpeOginni commented Mar 5, 2026

Issue for this PR

Closes #16168

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

  • Updated formatServerError to accept a translation function for better localization, rather than having to pass in the text per error type which im the long term will be a hassle to manage, this way any error can be passed in as as long as it satisfies the condition of a recognised error we are able to send the right error message in the right language.
  • Simplified error handling in createGlobalSync and bootstrapGlobal by using the new translation approach.
  • Added parsing for Invalid Model Error to show proper error message when the user is using a model not configured in a command

How did you verify your code works?

Tested on the local dev env

Screenshots / recordings

Screen.Recording.2026-03-05.at.12.57.07.mov

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

…rror formatting

- Updated `formatServerError` to accept a translation function for better localization.
- Simplified error handling in `createGlobalSync` and `bootstrapGlobal` by using the new translation approach.
- Added tests for new error formatting behavior, including handling of provider model not found errors.
@OpeOginni OpeOginni requested a review from adamdotdevin as a code owner March 5, 2026 12:08
@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. needs:title labels Mar 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Hey! Your PR title refactor(desktop_: improve error handling and translation in server error formatting doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@OpeOginni OpeOginni changed the title refactor(desktop_: improve error handling and translation in server error formatting refactor(desktop): improve error handling and translation in server error formatting Mar 5, 2026
@github-actions github-actions bot removed needs:compliance This means the issue will auto-close after 2 hours. needs:title labels Mar 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@adamdotdevin adamdotdevin merged commit 27baa2d into anomalyco:dev Mar 5, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generic Error Message when trying to Run Commands

2 participants