{"record":{"id":"51c1c9d281c14213","repo":"stablyai/orca","slug":"diagnostic-upload-endpoint-is-not-configured-for-t","errorCode":null,"errorMessage":"diagnostic upload endpoint is not configured for this build","messagePattern":"diagnostic upload endpoint is not configured for this build","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/main/ipc/diagnostics.ts","lineNumber":304,"sourceCode":"      throw new Error('could not open review file')\n    }\n    const pending = pendingBundles.get(bundleSubmissionId as string)\n    if (pending) {\n      pending.previewOpened = true\n    }\n  })\n\n  ipcMain.handle('diagnostics:discardBundlePreview', (_event, bundleSubmissionId: unknown) => {\n    discardPendingBundle(bundleSubmissionId)\n  })\n\n  ipcMain.handle('diagnostics:deleteBundle', async (_event, ticketId: unknown): Promise<void> => {\n    if (!isTicketId(ticketId)) {\n      throw new Error('ticketId has invalid format')\n    }\n    const tokenEndpoint = resolveDiagnosticTokenEndpoint()\n    if (!tokenEndpoint) {\n      throw new Error('diagnostic upload endpoint is not configured for this build')\n    }\n    await deleteDiagnosticBundle({ tokenEndpoint, ticketId })\n  })\n}\n","sourceCodeStart":286,"sourceCodeEnd":309,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/ipc/diagnostics.ts#L286-L309","documentation":"Thrown by the `diagnostics:deleteBundle` IPC handler when `resolveDiagnosticTokenEndpoint()` returns null. Deleting an already-uploaded bundle by ticket ID requires the same token endpoint as uploading, so the resolver failure is identical in cause to 1103: an official build missing the CI-substituted `ORCA_DIAGNOSTICS_TOKEN_URL`, or a dev build missing both the env var and the build constant.","triggerScenarios":"Invoking `ipcRenderer.invoke('diagnostics:deleteBundle', ticketId)` (after `isTicketId(ticketId)` passes) on a build where `resolveDiagnosticTokenEndpoint()` is null.","commonSituations":"Dev build without `ORCA_DIAGNOSTICS_TOKEN_URL`; official build whose CI skipped token-URL substitution; attempting to delete a bundle from a build that never could have uploaded it.","solutions":["Set `ORCA_DIAGNOSTICS_TOKEN_URL` for dev builds before launching.","Fix the release CI to inject the token URL constant for official builds.","Gate the delete-by-ticket UI on endpoint availability so the action is not offered when it cannot succeed."],"exampleFix":"// before\nawait ipcRenderer.invoke('diagnostics:deleteBundle', ticketId)\n\n// after\n// only show 'Delete uploaded bundle' when the build can reach the endpoint\nif (endpointConfigured) {\n  await ipcRenderer.invoke('diagnostics:deleteBundle', ticketId)\n} else {\n  showNotice('Bundle deletion needs a configured diagnostics endpoint for this build.')\n}","handlingStrategy":"validation","validationCode":"// Gate the delete-by-ticket UI on endpoint availability, same as upload.\nif (!buildHasDiagnosticEndpoint()) {\n  showNotice('Bundle deletion requires a configured diagnostics endpoint.')\n  return\n}\nawait ipcRenderer.invoke('diagnostics:deleteBundle', ticketId)","typeGuard":"function isTicketId(v: unknown): v is string {\n  return typeof v === 'string' && /^[A-Za-z0-9_-]{1,128}$/.test(v)\n}","tryCatchPattern":"try {\n  await ipcRenderer.invoke('diagnostics:deleteBundle', ticketId)\n} catch (e) {\n  if (e instanceof Error && e.message === 'diagnostic upload endpoint is not configured for this build') {\n    showBuildConfigNotice()\n    return\n  }\n  throw e\n}","preventionTips":["Configure ORCA_DIAGNOSTICS_TOKEN_URL for dev builds that need deletion.","Ensure release CI substitutes the token URL so GDPR-style deletion works in shipped builds.","Only show 'Delete uploaded bundle' when the endpoint is reachable for the current build."],"tags":["diagnostics","configuration","build-config","network","env","gdpr"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}