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

refactor: introduce standardized error messages and stacktraces #869

Merged
merged 5 commits into from
Aug 8, 2024

Conversation

anshchaturvedi
Copy link
Contributor

@anshchaturvedi anshchaturvedi commented Aug 7, 2024

This update adds [INFO], [WARN], and [ERROR] prefixes to error messages to make them easier to read and understand during debugging. It also includes stack traces for E.left returns outside of cli.ts to help with troubleshooting.


How logging looks:
image

How errors look:
image

Ticket: DX-660

@anshchaturvedi anshchaturvedi changed the title refactor: introduce standardized error messages refactor: introduce standardized error messages and stacktraces Aug 7, 2024
@anshchaturvedi anshchaturvedi marked this pull request as ready for review August 7, 2024 20:53
@anshchaturvedi anshchaturvedi requested review from a team as code owners August 7, 2024 20:53
Introduces `[INFO]`, `[WARN]`, and `[ERROR]` prefixes to error messages to make them easier to read and understand when debugging. The hope is that we remain consistent with this formatting across the codebase.

Ticket: DX-660
This adds a stacktrace as a string alongside the message passed to the E.left.

Ticket: DX-660
Adds a utility function to strip stacktraces off of errors since they
are machine/platform dependent and cannot hard-code them into tests.

Ticket: DX-660
Copy link
Contributor

@ad-world ad-world left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it, this will be a very helpful change for downstream users!

SUI 👍

@anshchaturvedi anshchaturvedi merged commit aa52270 into master Aug 8, 2024
6 checks passed
@anshchaturvedi anshchaturvedi deleted the DX-660-introduce-stacktraces branch August 8, 2024 16:50
Copy link

github-actions bot commented Aug 8, 2024

🎉 This PR is included in version @api-ts/[email protected] 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version @api-ts/[email protected] 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version @api-ts/[email protected] 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version @api-ts/[email protected] 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version @api-ts/[email protected] 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants