Wrap paseo CLI JSON.parse calls with diagnosable errors - #7
Merged
Merged
Conversation
Raw JSON.parse threw an opaque native SyntaxError with no indication of which paseo command produced it. Wrap each call site with a helper that reports the command and a snippet of the actual output, since a Transport-closed daemon reconnect can leave malformed/concatenated JSON on stdout. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wire-paseoandpaseo-statuscrashed with an opaque nativeSyntaxError("Unexpected non-whitespace character after JSON at position 2") whenpaseo ... --jsonreturned malformed output — observed alongside aTransport closed (code 1006)daemon reconnect, which can leave two JSON values concatenated on stdout with no separator.parsePaseoJson()to wrap everyJSON.parsecall on paseo CLI/daemon-config output, so a parse failure now names the command and includes a snippet of the raw output plus a pointer to checkpaseo daemon status, instead of a bare, uninformativeSyntaxError.Test plan
"{}[]") onpaseo plugin ls --json, asserting the thrown error names the command.tsc --noEmitclean.