papi-dts
    Preparing search index...

    Function describeWebSocketErrorEvent

    • Describe a WebSocket error event for a log line.

      The ws library's ErrorEvent keeps message and error as accessors on the prototype, so JSON.stringify on the event yields {} — only own properties are serialized. Read the fields explicitly.

      Note a browser WebSocket fires a plain Event on error, carrying no detail at all by specification, so message=unknown is the expected result on the renderer end.

      Parameters

      • ev: unknown

        A WebSocket error event, or anything at all

      Returns string

      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.