(
forbidden: { type: string; message: string; operation?: string; target?: string },
failed?: { error: string; retryable?: boolean }
)
| 23 | export 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( |
no outgoing calls
no test coverage detected