Skip to content

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