Skip to content

RFC: fix: FatalError set reference to causing error #1257

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

Merged
merged 1 commit into from
Apr 15, 2025

Conversation

ivanjh
Copy link
Contributor

@ivanjh ivanjh commented Feb 8, 2025

  • All tests pass (no - I don't have suitable tokens to test all integration tests)
  • I have run npm run doc (not part of external api)

Description

FatalError does not provide enough context for understanding underlying issues.
Where available, attach the "causing" error to the FatalError to allow later inspection on .cause (see https://nodejs.org/api/errors.html#errorcause)

Serializing Error objects with util.inspect() recursively serializes error.cause if it is set and would allow better log messages in consuming applications.

I don't believe the existing approach of copying of the stack from the causing error is "least surprise" for consuming authors, but I do not yet understand reasons for why it is as is, or likelihood of breaking existing code.

References

Recent node versions introduced a bug (nodejs/node#54359) in certain network configurations that is becoming more numerous triggering EFATAL errors.

Reports often miss much depth, with only "EFATAL: AggregateError" as a description:

@windkh
Copy link
Contributor

windkh commented Feb 8, 2025

+1

1 similar comment
@tedtribe
Copy link

+1

@danielperez9430
Copy link
Collaborator

LGTM

@danielperez9430 danielperez9430 merged commit 12d28f3 into yagop:master Apr 15, 2025
@Vacxe
Copy link

Vacxe commented Jun 11, 2025

Please prepare a new release

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

Successfully merging this pull request may close these issues.

5 participants