(evt: ErrorEvent)
| 175 | syncConnection.dispatchCommand(parsedMessage); |
| 176 | }); |
| 177 | let errorHandler = (evt: ErrorEvent) => { |
| 178 | // This is what will fire if, for example, platform limitations are hit like message size |
| 179 | // Unfortunately the returned error (at least in wrangler) is not descriptive at all |
| 180 | closeSocket( |
| 181 | server, |
| 182 | { type: 'INTERNAL_ERROR', retry: false, message: evt?.error?.message }, |
| 183 | 1011 |
| 184 | ); |
| 185 | this.triplitServer.closeConnection(syncConnection); |
| 186 | unsubscribeMessageListener(); |
| 187 | }; |
| 188 | let closeHandler = (evt: CloseEvent) => { |
| 189 | // For now echo back code and reason |
| 190 | // Should this use the closeSocket function? |
nothing calls this directly
no test coverage detected