{"record":{"id":"b6ca59d973d8c6d7","repo":"cline/cline","slug":"invalid-token-exchange-response","errorCode":null,"errorMessage":"Invalid token exchange response","messagePattern":"Invalid token exchange response","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdk/packages/core/src/auth/cline.ts","lineNumber":270,"sourceCode":"\trefresh_token?: string;\n\ttoken_type?: string;\n\texpires_in?: number;\n\terror?: string;\n\terror_description?: string;\n};\n\ntype WorkOSTokenSuccess = {\n\taccessToken: string;\n\trefreshToken: string;\n\ttokenType: string;\n};\n\nfunction requireClineTokenResponse(\n\tpayload: ClineTokenResponse,\n\tmessage: string,\n): ClineAuthResponseData {\n\tif (!payload.success || !payload.data?.accessToken) {\n\t\tthrow new Error(message);\n\t}\n\treturn payload.data;\n}\n\nasync function requestWorkOSDeviceAuthorization(\n\tclientId: string,\n\toptions?: { requestTimeoutMs?: number },\n): Promise<{\n\tdeviceCode: string;\n\tuserCode: string;\n\tverificationUri: string;\n\tverificationUriComplete?: string;\n\texpiresInSeconds: number;\n\tpollIntervalSeconds: number;\n}> {\n\tconst response = await fetch(\n\t\tresolveUrl(\n\t\t\tDEFAULT_WORKOS_API_BASE_URL,","sourceCodeStart":252,"sourceCodeEnd":288,"githubUrl":"https://github.com/cline/cline/blob/491b30b806fdb8c93513f821f2b87d63a61542f5/sdk/packages/core/src/auth/cline.ts#L252-L288","documentation":"Error \"Invalid token exchange response\" thrown in cline/cline.","triggerScenarios":"Thrown at sdk/packages/core/src/auth/cline.ts:270 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":"491b30b806fdb8c93513f821f2b87d63a61542f5","analyzedAt":"2026-08-25T13:45:22.367Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}