Skip to content

git: Include GitErrorData in GitError.toString#36971

Merged
joaomoreno merged 1 commit intomicrosoft:masterfrom
keegancsmith:git-error-to-string
Oct 27, 2017
Merged

git: Include GitErrorData in GitError.toString#36971
joaomoreno merged 1 commit intomicrosoft:masterfrom
keegancsmith:git-error-to-string

Conversation

@keegancsmith
Copy link
Contributor

We are passing GitErrorData to JSON.stringify to include in the string
generated by GitError.toString. However, we set replacer to [] which
means JSON.stringify will always serialize to { }. After this change
GitError messages should be more understandable, and not just say Failed to execute git { }.

We are passing `GitErrorData` to `JSON.stringify` to include in the string
generated by `GitError.toString`. However, we set `replacer` to `[]`, which
means `JSON.stringify` will _always_ serialize to `{ }`. After this change
GitError messages should be more understandable, and not just say `Failed to
execute git`.
@joaomoreno joaomoreno merged commit 178d056 into microsoft:master Oct 27, 2017
@joaomoreno
Copy link
Member

Great catch, thanks! 🍻

@joaomoreno joaomoreno added this to the October 2017 milestone Oct 27, 2017
@joaomoreno joaomoreno added the git GIT issues label Oct 27, 2017
@keegancsmith keegancsmith deleted the git-error-to-string branch October 27, 2017 11:57
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

git GIT issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants