MCPcopy Create free account
hub / github.com/vercel/examples / error

Function error

websockets/nuxt/server/api/ws.ts:75–81  ·  view source on GitHub ↗
(peer, error)

Source from the content-addressed store, hash-verified

73 peer.publish(CHANNEL, JSON.stringify({ t: 'leave', id: identity.id } satisfies ServerMessage))
74 },
75 error(peer, error) {
76 console.error('[realtime] ws error', peer.id, error)
77 const identity = peer.context.identity as Peer | undefined
78 if (!identity) return
79 peers.delete(identity.id)
80 peer.publish(CHANNEL, JSON.stringify({ t: 'leave', id: identity.id } satisfies ServerMessage))
81 },
82})

Callers 4

+page.server.tsFile · 0.50
GETFunction · 0.50
loadFunction · 0.50
handle_submitFunction · 0.50

Calls 1

publishMethod · 0.80

Tested by

no test coverage detected