core.error stack trace logging
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the enhancement
Currently, the core package's error function uses toString() on errors reported using this function, and so after the error message is printed, the stack trace is lost.
There is a strong argument to be made for instead printing the stack trace when an error is provided, to make it easier for package integrators to debug their integrations.
Code Snippet
The relevant code can be found here.
Additional information
This change was originally proposed by @iamstarkov in this PR
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect packages/core/src/core.ts around line 257, where the core package's error function currently formats errors with toString(). Review the approach proposed in pull request 1948. Done means that errors reported through this function retain their stack trace in the printed output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100