{"record":{"id":"571d0806bd0974a8","repo":"paperclipai/paperclip","slug":"https-exposure-reservation-failed-result-status","errorCode":null,"errorMessage":"HTTPS exposure reservation failed: ${result.status.lastError ?? \"unknown broker error\"}","messagePattern":"HTTPS exposure reservation failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/services/workspace-runtime.ts","lineNumber":4227,"sourceCode":"        claimant: input.claimant,\n        ledger,\n        listenerOwners: await readExposureListenerOwners([pair.appPort, pair.hmrPort]),\n        serveMappingOwners,\n      });\n      if (conflict) throw new ExposurePortOwnershipConflictError(conflict);\n\n      const result = await reserveExposure(workspaceRuntimeExposureDeps, {\n        runtimeId: input.runtimeId,\n        config: input.config,\n        appPort: pair.appPort,\n      });\n      if (result.handle) {\n        // Keep this pair's claim; the caller releases it on stop/teardown.\n        claimed.pop();\n        return { appPort: pair.appPort, hmrPort: pair.hmrPort, status: result.status, handle: result.handle };\n      }\n      if (!result.status.lastError || !retryable.has(result.status.lastError)) {\n        throw new Error(`HTTPS exposure reservation failed: ${result.status.lastError ?? \"unknown broker error\"}`);\n      }\n      reserved.add(pair.appPort);\n      reserved.add(pair.hmrPort);\n      // The preference lost its race with a conflicting/manual/quarantined\n      // mapping; drop it so the retry scans instead of re-offering the same port.\n      preferredAppPort = null;\n    }\n  } finally {\n    // Every pair this call took but did not hand back — rejected candidates and\n    // the in-flight pair on a thrown failure — goes back immediately. Leaving\n    // them held would burn the range down over a retry storm.\n    for (const pair of claimed) exposurePortPairClaims.release(pair);\n  }\n}\n\nasync function canBindRuntimePort(port: number): Promise<boolean> {\n  return await new Promise<boolean>((resolve, reject) => {\n    const server = net.createServer();","sourceCodeStart":4209,"sourceCodeEnd":4245,"githubUrl":"https://github.com/paperclipai/paperclip/blob/a7e689b3c35347b529cb9f54c9b9a8575a3dcab6/server/src/services/workspace-runtime.ts#L4209-L4245","documentation":"After passing conflict mediation, the broker call to reserve the HTTPS exposure failed (result carried no handle), and the reservation error is surfaced from the broker's lastError. The exposure subsystem could not secure its reservation.","triggerScenarios":"Thrown at server/src/services/workspace-runtime.ts:4170 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the HTTPS exposure broker's status.lastError for the concrete failure reason and retry the reservation after addressing it.","Verify the broker service is reachable and its credentials/configuration are valid, then retry the exposure reservation."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a7e689b3c35347b529cb9f54c9b9a8575a3dcab6","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}