Skip to content

Conversation

@ieedan
Copy link
Collaborator

@ieedan ieedan commented Nov 19, 2025

Removes redundant "Error fetching" prefixes in stacked error messages to improve readability.


Open in Cursor Open in Web

Co-authored-by: aidanbleser35 <aidanbleser35@gmail.com>
@changeset-bot
Copy link

changeset-bot bot commented Nov 19, 2025

🦋 Changeset detected

Latest commit: d9874e0

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Nov 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
jsrepo.dev Ready Ready Preview Comment Nov 19, 2025 7:33pm

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 19, 2025

Open in StackBlitz

jsrepo

pnpm add https://pkg.pr.new/jsrepojs/jsrepo@686

@jsrepo/mcp

pnpm add https://pkg.pr.new/jsrepojs/jsrepo/@jsrepo/mcp@686

@jsrepo/migrate

pnpm add https://pkg.pr.new/jsrepojs/jsrepo/@jsrepo/migrate@686

@jsrepo/transform-biome

pnpm add https://pkg.pr.new/jsrepojs/jsrepo/@jsrepo/transform-biome@686

@jsrepo/transform-javascript

pnpm add https://pkg.pr.new/jsrepojs/jsrepo/@jsrepo/transform-javascript@686

@jsrepo/transform-prettier

pnpm add https://pkg.pr.new/jsrepojs/jsrepo/@jsrepo/transform-prettier@686

commit: dbd0b28

@ieedan
Copy link
Collaborator Author

ieedan commented Nov 19, 2025

@cursoragent close but this is the error I get now:

Error fetching manifest file: Error fetching https://www.jsrepo.com/api/scopes/@ieedan/std/v/latest/files/registry.json: Error fetching https://www.jsrepo.com/api/scopes/@ieedan/std/v/latest/files/registry.json: 500 Internal Server Error Please try again.

@cursor
Copy link

cursor bot commented Nov 19, 2025

Summary

Fixed the error stacking. The issue was that provider catch blocks were re-wrapping ProviderFetchError instances using the full formatted error.message, causing duplication.

Changes made:

  1. Updated all provider catch blocks to check if the caught error is already a ProviderFetchError and use its originalMessage instead of the full formatted message:
    • jsrepo.ts
    • http.ts
    • github.ts
    • gitlab.ts
    • bitbucket.ts
    • azure.ts
    • fs.ts
    • shadcn/src/provider.ts

Result:

Error messages are now clean and readable without repetition. The fix ensures that when a ProviderFetchError is caught and re-thrown (e.g., when wrapping it in a ManifestFetchError), only the original error message is used, not the full formatted message.


Open in Cursor Open in Web

Learn more about Cursor Agents

Co-authored-by: aidanbleser35 <aidanbleser35@gmail.com>
@ieedan ieedan marked this pull request as ready for review November 19, 2025 19:31
@ieedan
Copy link
Collaborator Author

ieedan commented Nov 19, 2025

@cursor add a changeset pnpm changeset

@cursor
Copy link

cursor bot commented Nov 19, 2025

Created the changeset file at .changeset/fix-error-stacking.md. It includes:

  • Package: jsrepo
  • Version bump: patch (bug fix)
  • Description: Fixes error message stacking in manifest fetch errors

This should satisfy the changeset bot and allow the PR to be merged with a version bump. The changeset documents that this is a patch-level fix that improves error message readability.


Open in Cursor Open in Web

Learn more about Cursor Agents

Co-authored-by: aidanbleser35 <aidanbleser35@gmail.com>
@ieedan ieedan merged commit 2d20f97 into next Nov 19, 2025
2 checks passed
@ieedan ieedan deleted the cursor/fix-manifest-fetch-400-error-1f57 branch November 19, 2025 19:33
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.

3 participants