{"record":{"id":"5586035d640cad6e","repo":"moeru-ai/airi","slug":"the-base-url-is-not-an-absolute-http-or-https-558603","errorCode":null,"errorMessage":"The Base URL is not an absolute http:// or https:// address.","messagePattern":"The Base URL is not an absolute http:// or https:// address\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/provider-inference/src/providers/local/voicevox/engine.ts","lineNumber":189,"sourceCode":"  const body = await response.text()\n  try {\n    return JSON.parse(body) as T\n  }\n  catch {\n    throw new Error(`Speech engine answered /${endpoint} with a body that is not JSON. Check that the Base URL points at a VOICEVOX-compatible engine.`)\n  }\n}\n\nasync function request(\n  engineRequest: VoicevoxEngineRequest,\n  options?: VoicevoxEngineRequestOptions,\n): Promise<Response> {\n  let url: URL\n  try {\n    url = buildUrl(engineRequest)\n  }\n  catch {\n    throw new Error('The Base URL is not an absolute http:// or https:// address.')\n  }\n\n  const doFetch = options?.fetch ?? globalThis.fetch\n  const response = await doFetch(url, {\n    method: POST_ENDPOINTS.has(engineRequest.endpoint) ? 'POST' : 'GET',\n    // No engine in the family redirects. A redirect therefore means the Base URL\n    // points at something else, and following it would hide that.\n    redirect: 'error',\n    signal: options?.signal,\n    ...(engineRequest.body === undefined\n      ? {}\n      : { body: JSON.stringify(engineRequest.body), headers: { 'Content-Type': 'application/json' } }),\n  })\n\n  if (!response.ok) {\n    const detail = (await response.text()).trim()\n    const suffix = detail ? `: ${detail.slice(0, 200)}` : ''\n    throw new Error(`Speech engine answered ${response.status} ${response.statusText} for /${engineRequest.endpoint}${suffix}`)","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/moeru-ai/airi/blob/f679616c34f1cf6d282c8d64264242af944b3fed/packages/provider-inference/src/providers/local/voicevox/engine.ts#L171-L207","documentation":"buildUrl's URL constructor threw because the configured baseUrl is not an absolute http(s) address (missing scheme, empty, or malformed). request catches that low-level TypeError and rethrows this clearer validation error before any network call, so the user fixes the Base URL instead of seeing an opaque URL failure.","triggerScenarios":"Thrown at packages/provider-inference/src/providers/local/voicevox/engine.ts:189 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set an absolute Base URL starting with http:// or https:// in the provider configuration","Trim whitespace and add the missing scheme (e.g. http://127.0.0.1:50021)","Validate the URL in settings UI before saving to catch this earlier"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f679616c34f1cf6d282c8d64264242af944b3fed","analyzedAt":"2026-09-08T13:18:15.005Z","contentChangedAt":"2026-09-08T13:18:15.005Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}