h3poteto / megalodon

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

Fix argument on websocket error event #2158

Closed urmaul closed 4 months ago

urmaul commented 4 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 4 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 4 months ago

Thank you