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

It should be possible to pass Error object to ServiceStream.abort #74

Open
azasypkin opened this issue Aug 5, 2015 · 0 comments
Open

Comments

@azasypkin
Copy link
Contributor

Currently if you pass real Error object to stream you'll get "DataCloneError: The object could not be cloned" exception. Would be helpful if Bridge can to at least extract actual error message and send back to client.

To reproduce issue you can just have a service with stream method that calls abort once stream is initiated:

service.stream(
  'test-stream',
  (stream) => stream.abort(new Error('Custom error message'))
);

and client:

var clientStream = client.stream('test-stream');
clientStream.closed.catch((e) => console.error(e));

----->
// 'Custom error message'
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

No branches or pull requests

1 participant