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

Issue 224 client errors hide away #318

Merged
merged 8 commits into from Oct 26, 2017

Conversation

Projects
None yet
2 participants
@samson84
Contributor

samson84 commented Aug 27, 2017

Hi, here is my first attempt to #224.

Finally, I chose the on_user_error and on_internal_error solution and did not make any custom error typing, simply pass through the error objects to the handler. I have created an error_handler utility function, which examines the error and the given error handler parameter, and if the error handler is a function, it is called, else a console.error is written --> so no hide away errors anymore.

I looked for a log references through session & connection and changed it to the function above, where it has a meaning.

Added some end to end tests for onopen, onclose, oninvoke and on event cases. But not for the internal errors, neither for the onchallenge callback --> if you have some mocking tips I'm happy to create that part too.

The documentation is updated too.

@oberstet oberstet merged commit 8ad8f0e into crossbario:master Oct 26, 2017

@oberstet

This comment has been minimized.

Show comment
Hide comment
@oberstet

oberstet Oct 26, 2017

Member

awesome. default behavior stays unchanged, but now users can handle errors themselves too. thanks for contributing!

Member

oberstet commented Oct 26, 2017

awesome. default behavior stays unchanged, but now users can handle errors themselves too. thanks for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment