Files
payloadcms/packages
Dan Ribbens 488c28c99c fix: getPayload node exits on webpack-hmr websocket failure (#9279)
### What?
When a script attempts to load payload using `getPayload()`, it will end
with: `Error: connect ECONNREFUSED 127.0.0.1:3000` etc...

### Why?

Even though there is a try/catch, it still errors because WebSocket
connection failures happen asynchronously after the ws object is
instantiated.

### How?

Added the error handling function cached.ws.onerror to prevent exit.
2024-11-18 09:03:52 -05:00
..