Skip to content

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 force-pushed the DX-660-introduce-stacktraces branch from 6c4f2ad to 6f754f1 Compare August 7, 2024 19:50
@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
Ansh Chaturvedi added 4 commits August 7, 2024 16: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
@anshchaturvedi anshchaturvedi force-pushed the DX-660-introduce-stacktraces branch from 5eababd to c11dc0e Compare August 7, 2024 20:54
@anshchaturvedi anshchaturvedi requested a review from ad-world August 8, 2024 16:01
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
@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/openapi-generator@4.29.0 🎉

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

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version @api-ts/io-ts-http@3.2.0 🎉

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

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version @api-ts/express-wrapper@1.0.30 🎉

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

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version @api-ts/superagent-wrapper@1.3.0 🎉

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

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version @api-ts/typed-express-router@1.1.10 🎉

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