{"record":{"id":"bbad8840ae3435fc","repo":"diegosouzapw/OmniRoute","slug":"unhandled-cursorrenewalresult-status-json-strin","errorCode":null,"errorMessage":"Unhandled CursorRenewalResult status: ${JSON.stringify(_exhaustive)}","messagePattern":"Unhandled CursorRenewalResult status: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/tokenHealthCheckCursor.ts","lineNumber":86,"sourceCode":"          result.status === \"error\"\n            ? `Cursor session renewal failed: ${result.error}`\n            : \"Cursor session unchanged — no newer token found on this host.\";\n        await updateProviderConnection(\n          conn.id,\n          buildRefreshFailureUpdate(conn, now, {\n            errorCode: \"cursor_session_stale\",\n            lastErrorType: \"cursor_session_stale\",\n            lastError: message,\n            testStatus: \"active\",\n          })\n        );\n        const logFn = result.status === \"error\" ? logError : logWarn;\n        logFn(`${logPrefix} ✗ Cursor session stale for ${getConnectionLogLabel(conn)}: ${message}`);\n        return;\n      }\n      default: {\n        const _exhaustive: never = result;\n        throw new Error(`Unhandled CursorRenewalResult status: ${JSON.stringify(_exhaustive)}`);\n      }\n    }\n  });\n}\n","sourceCodeStart":68,"sourceCodeEnd":91,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/tokenHealthCheckCursor.ts#L68-L91","documentation":"Exhaustiveness assertion in the Cursor token health check: a switch over CursorRenewalResult.status reached a value outside the known union (renewed/stale/error/…). This is a defensive invariant violation — new status was added to the type without a handler — not an expected runtime condition; the JSON of the unmatched value is embedded for diagnosis.","triggerScenarios":"Thrown at src/lib/tokenHealthCheckCursor.ts:86 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Update the health check to handle the new CursorRenewalResult status","Fall back to treating unknown statuses as non-renewal (skip the connection) until patched"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}