Ogmios disconnects the WebSocket when attempting to submit some invalid payloads. Once disconnected, the server must be restarted. There are also a couple of bugs with the connection context error and close handlers, causing a bunyan error.
Proposed Solution
Hoist the context init to DRY the code.
Fix the handlers to always log a structured object
Treat 1006 close events as an error, the rest as informational.
Shutdown and re-initialize the client on unexpected close events.
Context
Ogmios disconnects the WebSocket when attempting to submit some invalid payloads. Once disconnected, the server must be restarted. There are also a couple of bugs with the connection context error and close handlers, causing a bunyan error.
Proposed Solution
1006
close events as an error, the rest as informational.Important Changes Introduced
Example of the bunyan error: