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

Add note in docs for origins(fn) about error needing to be a string. #2895

Merged
merged 1 commit into from
Mar 10, 2018

Conversation

sgress454
Copy link
Contributor

The kind of change this PR does introduce

  • a bug fix
  • a new feature
  • an update to the documentation
  • a code change that improves performance
  • other

Current behaviour

The docs for origins(fn) currently don't mention that error has to be supplied as a string. This really tripped me up as I was supplying an Error instance as I usually do for callbacks, which crashes w/ certain versions of Node.

New behaviour

Added line to documentation indicating that error should be a string.

Other information (e.g. related issues)

An alternative to this would be to patch engine.io to allow an Error instance in its abortConnection method, using its message property as the error message.

@YvonneMcLeod
Copy link

Pull/2895

@darrachequesne darrachequesne merged commit ad0c052 into socketio:master Mar 10, 2018
@darrachequesne
Copy link
Member

Thanks 👍

That behaviour is indeed weird, I'll add it to the list of breaking changes for version 4.0.0 of engine.io.

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.

3 participants