fix(copilot): surface error cause chain in sim-to-go span status#5473
Conversation
markSpanForError only recorded the top-level exception message, so a fetch() failure showed up as the generic "TypeError: fetch failed" with no indication of the real cause (ENOTFOUND, ECONNREFUSED, etc). Use describeError to walk the cause chain and set it as the span status message and an error.code attribute.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview When a structured Reviewed by Cursor Bugbot for commit b95c316. Configure here. |
1 similar comment
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit b95c316. Configure here.
Summary
markSpanForErroronly recorded the top-level exception message on the outbound Sim → Go span, so anyfetch()failure showed up as the genericTypeError: fetch failedwith no indication of the real causeENOTFOUNDon a staleSIM_AGENT_API_URLwithout manually cross-referencing dashboardsdescribeError(already in@sim/utils/errors, previously unused here) to walk the.causechain and surface it as the span status message plus a newerror.codeattributeType of Change
Testing
tsc --noEmitandbiome checkcleanTypeError: fetch failedfrom a dead DNS target and confirmeddescribeErrorcorrectly extracts the underlyingENOTFOUNDfrom.causeChecklist