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
Expose libgit2 error code to clients when a promise fails
When an API function of libgit2 fails within a promise, the promise is
rejected with a JavaScript Error object that wraps the recorded error
message in giterr_last(). However, the original non-zero return code of
the API function is not exposed to the caller of the NodeGit API. This
means that NodeGit clients cannot easily identify what the cause of an
error is outside of parsing the Error object's message. This is
an extremely volatile way of determining the cause as libgit2 may
choose to alter the wording of the message at any time.
To solve the problem above, the returned JavaScript Error object now
esposes the libgit2 error code via its `errno` property.
0 commit comments