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
Show error.message || error on failed command #7388
Conversation
Some exceptions, like module inclusion errors, don't generate nice Error objects with message defined. This causes hard-to-debug failures. When encountering an error with no message, show the whole Error object. Signed-off-by: Jason Prado <jason.prado@gmail.com>
46f45e7
to
9584116
Compare
Codecov Report
@@ Coverage Diff @@
## master #7388 +/- ##
=======================================
Coverage 26.22% 26.22%
=======================================
Files 1131 1131
Lines 15433 15433
Branches 2443 2443
=======================================
Hits 4048 4048
Misses 9565 9565
Partials 1820 1820
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Some exceptions, like module inclusion errors, don't generate nice Error objects with message defined. This causes hard-to-debug failures. When encountering an error with no message, show the whole Error object. Signed-off-by: Jason Prado <jason.prado@gmail.com> Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com> Signed-off-by: Gil Fernandes <gil.fernandes@onepointltd.com>
Some exceptions, like module inclusion errors, don't generate nice
Error objects with message defined. This causes hard-to-debug failures.
When encountering an error with no message, show the whole Error object.
Description of what you did:
In the
strapi
executable if a subcommand throws an error the driver printserror.message
. But some errors don't have amessage
and this leads to a bad error message in the console. I printerror.message || error
instead.