h3poteto / megalodon

Fediverse API client library for node.js and browser
https://h3poteto.github.io/megalodon/
MIT License
250 stars 33 forks source link

Fix argument on websocket error event #2158

Closed urmaul closed 8 months ago

urmaul commented 8 months ago

Expected behavior for stream error event is the error instance in the argument. Actual behavior is we get a WebSocket instance there and no error info.

This change fixes it.

urmaul commented 8 months ago

This is also a bit of a security issue because I'm trying to log these errors and instead I log a data structure with an SNS access token inside (it's in the request URI).

h3poteto commented 8 months ago

Thank you