{"record":{"id":"972d1ac65a3e5c32","repo":"usebruno/bruno","slug":"failed-to-queue-messages","errorCode":null,"errorMessage":"Failed to queue messages","messagePattern":"Failed to queue messages","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-app/src/utils/network/index.js","lineNumber":256,"sourceCode":"  }\n\n  if (status === 'connected' || status === 'connecting') {\n    return;\n  }\n\n  await connectWS(item, collection, environment, runtimeVariables, { connectOnly: true });\n};\n\nexport const sendWsRequest = async (item, collection, environment, runtimeVariables, selectedMessageIndex = 0) => {\n  await ensureWsConnection(item, collection, environment, runtimeVariables);\n\n  // Send only the selected message by index\n  const result = await queueWsMessage(item, collection, environment, runtimeVariables, selectedMessageIndex);\n\n  if (result.success) {\n    return {};\n  } else {\n    throw new Error(result.error || 'Failed to queue messages');\n  }\n};\n\n/**\n * Queues a message to an existing WebSocket connection with variable interpolation\n * @param {Object} item - The request item\n * @param {Object} collection - The collection object\n * @param {Object} environment - The environment variables\n * @param {Object} runtimeVariables - The runtime variables\n * @param {number} selectedMessageIndex - Index of the message to queue\n * @returns {Promise<Object>} - The result of the queue operation\n */\nexport const queueWsMessage = async (item, collection, environment, runtimeVariables, selectedMessageIndex) => {\n  return new Promise((resolve, reject) => {\n    const { ipcRenderer } = window;\n    ipcRenderer.invoke('renderer:ws:queue-message', {\n      item,\n      collection,","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-app/src/utils/network/index.js#L238-L274","documentation":"Error \"Failed to queue messages\" thrown in usebruno/bruno.","triggerScenarios":"Thrown at packages/bruno-app/src/utils/network/index.js:256 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry sending the request; the queue failure is usually transient.","Restart Bruno if message queue errors persist."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9bdd81c7bdc57006e5f5ebffb79321a8d979f712","analyzedAt":"2026-08-13T04:09:25.751Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}