Skip to content

fix: show the actual error when hook fails #4808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 5, 2019

Conversation

rosen-vladimirov
Copy link
Contributor

When hook throws an error, there's no easy way to find exactly what is failing as CLI overwrites the error and its callstack. As it is not trivial solution to stop CLI of doing this, when a hook fails, just log the error with its callstack. We know these errors always lead to stopage of CLI process, so we can safely print them.

PR Checklist

What is the current behavior?

What is the new behavior?

Fixes/Implements/Closes #[Issue Number].

When hook throws an error, there's no easy way to find exactly what is failing as CLI overwrites the error and its callstack. As it is not trivial solution to stop CLI of doing this, when a hook fails, just log the error with its callstack. We know these errors always lead to stopage of CLI process, so we can safely print them.
@rosen-vladimirov rosen-vladimirov self-assigned this Jul 5, 2019
@cla-bot cla-bot bot added the cla: yes label Jul 5, 2019
@rosen-vladimirov rosen-vladimirov merged commit 66f6f20 into release Jul 5, 2019
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/hooks-error branch July 5, 2019 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants