MCPcopy
hub / github.com/aspen-cloud/triplit / errorHandler

Method errorHandler

packages/cli/src/deploy/worker.ts:177–187  ·  view source on GitHub ↗
(evt: ErrorEvent)

Source from the content-addressed store, hash-verified

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?

Callers

nothing calls this directly

Calls 2

closeSocketFunction · 0.70
closeConnectionMethod · 0.45

Tested by

no test coverage detected