You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR bumps the CLI SDK from version 22.2.2 to 22.2.3 and introduces a formatErrorForLog helper that converts Error objects to a plain string before passing them to console.error, preventing compiled binaries from dumping their entire bundled source context on verbose or report errors.
lib/parser.ts: Adds formatErrorForLog, which inserts known Appwrite error fields (code, type, response) between the stack summary line and the frame list, then replaces both console.error(err) call sites with console.error(formatErrorForLog(err)).
Version files: package.json, package-lock.json, lib/constants.ts, install.sh, install.ps1, scoop/appwrite.config.json, and docs all consistently updated to 22.2.3.
Confidence Score: 4/5
The change is safe to merge; it only affects how errors are formatted before being printed to stderr and does not touch any business logic or data paths.
The core fix is straightforward and well-scoped. One minor gap remains: the --report path still embeds the raw err.stack when constructing the GitHub issue URL, so a large stack from a compiled binary could still produce an unusably long URL printed to the terminal — the same class of problem the PR is solving for console.error. Everything else, including the version bumps, is consistent across all relevant files.
lib/parser.ts — specifically the GitHub issue URL construction in the report path (line 720).
Important Files Changed
Filename
Overview
lib/parser.ts
Adds formatErrorForLog to convert Error objects to formatted strings before passing to console.error, preventing bundled source context from being dumped; the report-mode GitHub URL still embeds the raw stack
lib/constants.ts
SDK_VERSION bumped from 22.2.2 to 22.2.3
package.json
Package version bumped from 22.2.2 to 22.2.3, consistent with other files
package-lock.json
Lock file version updated to 22.2.3 to match package.json
install.sh
GITHUB_LATEST_VERSION updated to 22.2.3 for binary download
install.ps1
Windows binary download URLs updated to 22.2.3 for both x64 and arm64
scoop/appwrite.config.json
Scoop package version and binary download URLs updated to 22.2.3
CHANGELOG.md
22.2.3 changelog entry added describing the verbose/report error output fix
README.md
Version string in installation verification examples updated to 22.2.3
The --report path passes the raw err.stack into the actual-behavior URL query parameter (line 720), which is then printed to the terminal as part of githubIssueUrl.href (line 742). If err.stack contains bundled source context from a compiled binary — the same condition this PR is fixing for console.error — the generated URL will be extremely long, making it hard to use or even truncated/broken in some terminals and browsers. Consider using formatErrorForLog(err) here as well to keep the URL manageable.
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
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.
This PR contains updates to the SDK for version 22.2.3.
What's Changed