Skip to content

feat: improve error handling for empty or malformed prompt and resource files - #532

Closed
lucasdelellis wants to merge 4 commits into
basementstudio:canaryfrom
lucasdelellis:loaders-error-handling
Closed

feat: improve error handling for empty or malformed prompt and resource files#532
lucasdelellis wants to merge 4 commits into
basementstudio:canaryfrom
lucasdelellis:loaders-error-handling

Conversation

@lucasdelellis

Copy link
Copy Markdown

Closes #529

This PR extends error handling when loading tool files (PR #528) to resource and prompt files.

  • Skips empty files and missing default exports with clear, friendly warnings
  • Includes the file path in error messages for invalid resource and prompt implementations
  • Preserves full stack traces for real syntax/import errors
  • Adds a startup summary for skipped tools
  • Avoids repeated warning spam

Note: This contribution follows the same pattern as #528 to maintain code consistency, but it might be worth extracting the duplicated logic from the different loaders into a single shared utility.

@greptile-apps

greptile-apps Bot commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

PR author is not in the allowed authors list.

@vercel

vercel Bot commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

@lucasdelellis is attempting to deploy a commit to the xmcp Team on Vercel.

A member of the Team first needs to authorize it.

@0xKoller

Copy link
Copy Markdown
Contributor

Hi @lucasdelellis , closing this PR.

You can learn more #529

@0xKoller 0xKoller closed this Mar 30, 2026
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