Skip to content
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

unexpected error message is now formatted and takes in an error message #2855

Closed

Conversation

a-dubs
Copy link
Collaborator

@a-dubs a-dubs commented Nov 27, 2023

Why is this needed?

The unexpected error message does not reflect accurate log location when run by non root, and also the error message obfuscates the original error message so the end user has no context for what actually went wrong. This PR fixes that.

Changes messages.UnexpectedError from a NamedMessage to a FormattedNamedMessage so that it must be formatted with a string representing an exception/error message to give better context on what errors actually occurred.

Please Squash this PR with this commit message

cli: improved cli/log message for unexpected errors

Fixes: #2600

Test Steps

Checklist

  • I have updated or added any unit tests accordingly
  • I have updated or added any integration tests accordingly
  • Changes here need to be documented, and this was done in:

Does this PR require extra reviews?

  • Yes
  • No

Message for Unexpected errors is now a formatted string that takes
in an error message so that the original error message is no longer
hidden from the end user.
@a-dubs a-dubs force-pushed the better-unexpected-exception-msgs branch from 64a822f to 5c6237f Compare November 29, 2023 01:43
@a-dubs a-dubs closed this Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve the default error message when uncaught exceptions happen
1 participant