A WebSocket error event, or anything at all
A single log line holding message=, code= and, when the error carried one, a
stack: section. Never contains a line break, so an error keeps the one-record-per-line shape
every other line here has; a field that cannot be read is reported as unknown/n/a rather
than throwing.
Describe a WebSocket
errorevent for a log line.The
wslibrary'sErrorEventkeepsmessageanderroras accessors on the prototype, soJSON.stringifyon the event yields{}— only own properties are serialized. Read the fields explicitly.Note a browser
WebSocketfires a plainEventon error, carrying no detail at all by specification, somessage=unknownis the expected result on the renderer end.