Skip to content

Improve copying previous Execa errors #806

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
Feb 9, 2024
Merged

Conversation

ehmicky
Copy link
Collaborator

@ehmicky ehmicky commented Feb 9, 2024

This is an improvement upon #796, which was dealing with multiple Execa calls returning the same error instance.

The previous PR intentionally left out copying error properties except for message.
However, I was working on another PR (for #753) where this feature is being needed.

This PR improves how error instances are being copied: it now copies known error properties such as error.code and error.errno.

@sindresorhus sindresorhus merged commit 121a052 into main Feb 9, 2024
@sindresorhus sindresorhus deleted the improve-error-copy branch February 9, 2024 05:52
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.

None yet

2 participants