MCPcopy
hub / github.com/simstudioai/sim / emitOperationError

Function emitOperationError

apps/realtime/src/handlers/operations.ts:25–33  ·  view source on GitHub ↗
(
      forbidden: { type: string; message: string; operation?: string; target?: string },
      failed?: { error: string; retryable?: boolean }
    )

Source from the content-addressed store, hash-verified

23export function setupOperationsHandlers(socket: AuthenticatedSocket, roomManager: IRoomManager) {
24 socket.on('workflow-operation', async (data) => {
25 const emitOperationError = (
26 forbidden: { type: string; message: string; operation?: string; target?: string },
27 failed?: { error: string; retryable?: boolean }
28 ) => {
29 socket.emit('operation-forbidden', forbidden)
30 if (failed && data?.operationId) {
31 socket.emit('operation-failed', { operationId: data.operationId, ...failed })
32 }
33 }
34
35 if (!roomManager.isReady()) {
36 emitOperationError(

Callers 1

setupOperationsHandlersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected