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

[Feature]: Display all errors in AggregateError #14703

Closed
loozhengyuan opened this issue Nov 19, 2023 · 3 comments
Closed

[Feature]: Display all errors in AggregateError #14703

loozhengyuan opened this issue Nov 19, 2023 · 3 comments

Comments

@loozhengyuan
Copy link

loozhengyuan commented Nov 19, 2023

🚀 Feature Proposal

To improve debugging experience, I propose to properly display errors that are of AggregateError type. This was also raised by @SimenB in #12999.

Motivation

As of Jest 29.7.0, errors of AggregateError type is displayed like this:

AggregateError:

  at Function.Object.<anonymous>.AxiosError.from (../../node_modules/axios/lib/core/AxiosError.js:89:14)
  at RedirectableRequest.handleRequestError (../../node_modules/axios/lib/adapters/http.js:606:25)
  at ClientRequest.eventHandlers.<computed> (../../node_modules/follow-redirects/index.js:14:24)

Cause:
AggregateError:

This is not very helpful because the pertinent error information exists in the errors property.

Example

No response

Pitch

N/A

@loozhengyuan
Copy link
Author

I can submit a PR for this enhancement if blessed to proceed. Also, would be helpful to know if there is a desired output format for the aggregated errors. Many thanks!

@loozhengyuan
Copy link
Author

My apologies, I noted in jest-message-util that there already exists logic to handle this. Closing this in favour of bug report #14704.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant