{"record":{"id":"73fb981960817ff7","repo":"Kong/insomnia","slug":"url-is-required","errorCode":null,"errorMessage":"URL is required","messagePattern":"URL is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/insomnia/src/main/network/socket-io.ts","lineNumber":280,"sourceCode":"  const responsesDir = path.join(process.env['INSOMNIA_DATA_PATH'] || electron.app.getPath('userData'), 'responses');\n\n  const responseBodyPath = path.join(responsesDir, uuidV4() + '.response');\n  eventLogFileStreams.set(options.requestId, fs.createWriteStream(responseBodyPath));\n  const timelinePath = path.join(responsesDir, responseId + '.timeline');\n  timelineFileStreams.set(options.requestId, fs.createWriteStream(timelinePath));\n  requestIdToResponseIdMap.set(options.requestId, responseId);\n\n  // fallback to base environment\n  const workspaceMeta = await services.workspaceMeta.getOrCreateByParentId(options.workspaceId);\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  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 }: BaseSocketIORequest['headers'][0],\n    ) => ({ ...acc, [name.toLowerCase() || '']: value || '' });\n    const headers = options.headers;\n    const url = options.url;\n\n    const hasUserAgentHeader = headers.some(({ name }) => name?.toLowerCase() === 'user-agent');\n    const lowerCasedEnabledHeaders = headers\n      .filter(({ name, disabled }) => Boolean(name) && !disabled)\n      .reduce(reduceArrayToLowerCaseKeyedDictionary, {});\n    if (!options.suppressUserAgent && !request.disableUserAgentHeader && !hasUserAgentHeader) {\n      lowerCasedEnabledHeaders['user-agent'] = `insomnia/${version}`;\n    }\n","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/Kong/insomnia/blob/d9bb2b0142600f21309832daea3317942d285984/packages/insomnia/src/main/network/socket-io.ts#L262-L298","documentation":"Error \"URL is required\" thrown in Kong/insomnia.","triggerScenarios":"Thrown at packages/insomnia/src/main/network/socket-io.ts:280 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"}