style: rename catch (err|error) identifiers to catch (e)#1264
Open
John-David Dalton (jdalton) wants to merge 2 commits intomainfrom
Open
style: rename catch (err|error) identifiers to catch (e)#1264John-David Dalton (jdalton) wants to merge 2 commits intomainfrom
John-David Dalton (jdalton) wants to merge 2 commits intomainfrom
Conversation
Mechanical rename across 11 files to match the CLAUDE.md catch-binding convention. 12 catch clauses converted; body references renamed including inside template literal interpolations. Property keys and member-access expressions (logger.error, console.error) are left untouched. tsgo --noEmit clean post-sweep.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Object property key accidentally renamed from
errortoe- Changed
{ e, name, ok: false }to{ error: e, name, ok: false }to preserve the originalerrorproperty key after the catch variable was renamed fromerrortoe.
- Changed
Or push these changes by commenting:
@cursor push 4cddc6bbcb
Preview (4cddc6bbcb)
diff --git a/packages/cli/scripts/download-assets.mts b/packages/cli/scripts/download-assets.mts
--- a/packages/cli/scripts/download-assets.mts
+++ b/packages/cli/scripts/download-assets.mts
@@ -129,7 +129,7 @@
logger.groupEnd()
logger.error(`Failed to extract ${name}: ${e.message}`)
await logTransientErrorHelp(e)
- return { e, name, ok: false }
+ return { error: e, name, ok: false }
}
}You can send follow-ups to the cloud agent here.
The catch-variable rename script converted shorthand `{ error, name,
ok: false }` to `{ e, name, ok: false }`, which silently changed
the return-object shape — a real consumer-facing regression even
though no callers currently read `.error`. Spell it out as
`{ error: e, name, ok: false }` to keep the shape identical to
the pre-rename version.
Contributor
Author
|
bugbot run |
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 9c80133. Configure here.
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
Mechanical rename across 11 files to match the CLAUDE.md `catch (e)` convention. 12 catch clauses converted. Body references renamed (including inside template literal interpolations); property keys and member-access expressions (`logger.error`, `console.error`) are left untouched.
Test plan
Note
Low Risk
Mechanical rename of
catchbinding identifiers and corresponding references in CLI scripts/utilities; no control-flow or behavioral changes expected beyond error logging variable names.Overview
Standardizes error-handling style across CLI scripts and a couple runtime modules by renaming
catch (error|err)bindings tocatch (e)and updating all*.message/stack/log references accordingly.Also adjusts one returned error object in
download-assets.mtsto keep the keyerrorwhile storing the caught value ({ error: e, ... }).Reviewed by Cursor Bugbot for commit 9c80133. Configure here.