We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Say we have an eventsource client connected to a server and receiving messages.
Il the server goes down, the onerror callback is invoked, which is fine, but the event that is passed only contains { type: 'error' }
{ type: 'error' }
Could it be possible to add more info to the event, like the original error code ('ECONNREFUSED' for instance) ?
The text was updated successfully, but these errors were encountered:
The library currently emits Event for all events, but it should be possible to emit ErrorEvent instead, which can have an error property.
error
Do you want to have a go at implementing this?
Sorry, something went wrong.
I'm just bubbling up the error message with Event, not creating an ErrorEvent. Let me know if this is the wrong direction.
Event
ErrorEvent
eventsource@^3 exposes (ever so slightly) more information on errors.
eventsource@^3
No branches or pull requests
Say we have an eventsource client connected to a server and receiving messages.
Il the server goes down, the onerror callback is invoked, which is fine, but the event that is passed only contains
{ type: 'error' }
Could it be possible to add more info to the event, like the original error code ('ECONNREFUSED' for instance) ?
The text was updated successfully, but these errors were encountered: