Skip to content

Comments

fix(config): log warning when plugin path resolution fails#14556

Open
kevinWangSheng wants to merge 4 commits intoanomalyco:devfrom
kevinWangSheng:fix/plugin-resolve-warn-log
Open

fix(config): log warning when plugin path resolution fails#14556
kevinWangSheng wants to merge 4 commits intoanomalyco:devfrom
kevinWangSheng:fix/plugin-resolve-warn-log

Conversation

@kevinWangSheng
Copy link

@kevinWangSheng kevinWangSheng commented Feb 21, 2026

Issue for this PR

Closes #11701

Type of change

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

What does this PR do?

Adds a log.warn call in the previously empty catch (err) {} block when import.meta.resolve fails for a plugin path. Without this, misconfigured plugin paths fail silently with zero feedback.

How did you verify your code works?

Single-line change using the existing log instance. Follows the same pattern as line 296 in the same file.

Screenshots / recordings

N/A - no UI change.

Checklist

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

shenghui kevin and others added 3 commits February 21, 2026 05:02
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The session list command supports --format json for machine-readable
output, but the models command only supported plain text. This adds a
--format option with choices "text" (default) and "json" to bring
consistency across CLI commands and enable scripting use cases.

Closes anomalyco#14550

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When import.meta.resolve fails for a plugin path, the error was
completely swallowed by an empty catch block. This adds a warning log
so users can diagnose plugin loading issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Feb 21, 2026
The `model` object already contains an `id` field, so spreading it
after the explicit `id` property triggers TS2783. Move the spread
before the explicit properties so our composite id takes precedence.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Feb 21, 2026
@github-actions
Copy link
Contributor

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

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.

Empty catch blocks silently swallow errors in config and initialization

1 participant