{"record":{"id":"950a05cff4fc3db4","repo":"diegosouzapw/OmniRoute","slug":"could-not-get-machine-id","errorCode":null,"errorMessage":"Could not get machine ID","messagePattern":"Could not get machine ID","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/shared/utils/cloud.ts","lineNumber":14,"sourceCode":"import { getMachineId } from \"@/shared/utils/machine\";\n\n// Function to get cloud URL with machine ID\nexport function getCloudUrl(machineId) {\n  // Get from environment or default to localhost:8787\n  const cloudUrl = process.env.NEXT_PUBLIC_CLOUD_URL || \"http://localhost:8787\";\n  return `${cloudUrl}/${machineId}/v1/chat/completions`;\n}\n\n// Function to call cloud with machine ID\nexport async function callCloudWithMachineId(request) {\n  const machineId = await getMachineId();\n  if (!machineId) {\n    throw new Error(\"Could not get machine ID\");\n  }\n\n  const cloudUrl = getCloudUrl(machineId);\n\n  // Get the original request body and headers\n  const body = await request.json();\n  const headers = new Headers(request.headers);\n\n  // Remove authorization header since cloud won't need it (uses machineId instead)\n  headers.delete(\"authorization\");\n\n  // Call the cloud with machine ID\n  const response = await fetch(cloudUrl, {\n    method: \"POST\",\n    headers: headers,\n    body: JSON.stringify(body),\n  });\n","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/shared/utils/cloud.ts#L1-L32","documentation":"Error \"Could not get machine ID\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/shared/utils/cloud.ts:14 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":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}