actions / actions/toolkit

core.error stack trace logging

Open
#1,992 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement papercut
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.