Skip to content

fix(parsing): preserve error data COMPASS-11295 - #933

Open
mabaasit wants to merge 2 commits into
mainfrom
COMPASS-11295-error-data
Open

mabaasit wants to merge 2 commits into
mainfrom
COMPASS-11295-error-data

Conversation

@mabaasit

Copy link
Copy Markdown
Collaborator

Description

Open Questions

Checklist

@mabaasit
mabaasit requested review from a team as code owners October 23, 2026 14:23
@mabaasit
mabaasit requested review from nbbeeken and a balanced review from Copilot and removed request for Copilot October 23, 2026 14:23
@codeowners-service-app

codeowners-service-app Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Assigned ivandevp for team compass-developers because nbbeeken is out of office.
Assigned himanshusinghs for team mongosh-developers because nbbeeken is out of office.

@Anemy
Anemy requested a balanced review from Copilot October 23, 2026 15:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The worker response and client handling are consistent, and the regression assertions cover the intended metadata preservation.

No open issues 🎉

What changed in this PR

This PR preserves parser error metadata across the web worker boundary, allowing callers to receive location details alongside the original error type.

Changes:

  • Send error properties separately in failed worker responses and restore them on the client.
  • Extend the regression test to check error position and location metadata.
File Description
packages/​shell-bson-parser/​src/​worker.ts Include enumerable error properties in failed responses.
packages/​shell-bson-parser/​src/​worker-types.ts Add error properties to the failure response type.
packages/​shell-bson-parser/​src/​worker-client.ts Restore error properties before rejecting the request.
packages/​shell-bson-parser/​src/​index.spec.ts Verify preservation of error type and location metadata.

Review effort: Balanced

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