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

fix: properly serialize & unserialize errors across processes #1391

Merged
merged 2 commits into from
Mar 2, 2018

Conversation

matthewmueller
Copy link
Contributor

@matthewmueller matthewmueller commented Feb 28, 2018

This is a BREAKING change and builds upon this PR #1390.

This PR fixes #646 and cleans up some of the adhoc error handling we've been doing.

I've chosen to add error serialization & unserialization at the IPC-level. This makes the IPC more opinionated (errors must always come first), but it allows us to transport errors across processes gracefully. Since nightmare already considered errors as the first argument everywhere, I didn't have to change much.

In addition to #1390, this is a breaking change because now promises that are rejected will always return Error types, whereas before sometimes we were returning objects, sometimes strings, sometimes {}. This is a minor breaking change, but warrants the 3.0.0 bump.

@matthewmueller matthewmueller merged commit 8c8fd96 into master Mar 2, 2018
@matthewmueller matthewmueller deleted the fix/serialize-errors branch March 2, 2018 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

serializing error output
1 participant