{"record":{"id":"25a4a84d33977851","repo":"Kong/insomnia","slug":"url-is-required-25a4a8","errorCode":null,"errorMessage":"URL is required","messagePattern":"URL is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/insomnia/src/main/network/websocket.ts","lineNumber":196,"sourceCode":"\n  const workspaceMeta = await services.workspaceMeta.getOrCreateByParentId(options.workspaceId);\n  // fallback to base environment\n  const activeEnvironmentId = workspaceMeta.activeEnvironmentId;\n  const activeEnvironment = activeEnvironmentId && (await services.environment.getById(activeEnvironmentId));\n  const environment = activeEnvironment || (await services.environment.getOrCreateForParentId(options.workspaceId));\n  invariant(environment, 'failed to find environment ' + activeEnvironmentId);\n  const responseEnvironmentId = environment ? environment._id : null;\n\n  const caCert = await services.caCertificate.getByParentId(options.workspaceId);\n  const caCertficatePath = caCert && !caCert.disabled ? caCert.path : null;\n  // attempt to read CA Certificate PEM from disk, fallback to root certificates\n  // allow to read the file as it is chosen by user\n  const caCertificate =\n    (caCertficatePath && (await insecureReadFile(caCertficatePath))) || tls.rootCertificates.join('\\n');\n\n  try {\n    if (!options.url) {\n      throw new Error('URL is required');\n    }\n    const readyStateChannel = `${protocolName}.${request._id}.${REALTIME_EVENTS_CHANNELS.READY_STATE}`;\n\n    const reduceArrayToLowerCaseKeyedDictionary = (\n      acc: Record<string, string>,\n      { name, value }: BaseWebSocketRequest['headers'][0],\n    ) => ({ ...acc, [name.toLowerCase() || '']: value || '' });\n    const headers = options.headers;\n    let url = options.url;\n    let authCookie = null;\n    if (!options.authentication.disabled) {\n      if (options.authentication.type === 'basic') {\n        const { username, password, useISO88591 } = options.authentication;\n        const encoding = useISO88591 ? 'latin1' : 'utf8';\n        headers.push(getBasicAuthHeader(username, password, encoding));\n      }\n      if (options.authentication.type === 'apikey') {\n        const { key = '', value = '', addTo } = options.authentication; // Ensure key is not undefined","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia/src/main/network/websocket.ts#L178-L214","documentation":"Error \"URL is required\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia/src/main/network/websocket.ts:196 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d9bb2b0142600f21309832daea3317942d285984","analyzedAt":"2026-08-26T18:04:05.187Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}