{"record":{"id":"c3b5732f795ea382","repo":"diegosouzapw/OmniRoute","slug":"failed-to-register-client-error","errorCode":null,"errorMessage":"Failed to register client: ${error}","messagePattern":"Failed to register client: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/oauth/services/kiro.ts","lineNumber":43,"sourceCode":"    const endpoint = `https://oidc.${region}.amazonaws.com/client/register`;\n\n    const response = await fetch(endpoint, {\n      method: \"POST\",\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n      body: JSON.stringify({\n        clientName: KIRO_CONFIG.clientName,\n        clientType: KIRO_CONFIG.clientType,\n        scopes: KIRO_CONFIG.scopes,\n        grantTypes: KIRO_CONFIG.grantTypes,\n        issuerUrl: KIRO_CONFIG.issuerUrl,\n      }),\n    });\n\n    if (!response.ok) {\n      const error = await response.text();\n      throw new Error(`Failed to register client: ${error}`);\n    }\n\n    const data = await response.json();\n    return {\n      clientId: data.clientId,\n      clientSecret: data.clientSecret,\n      clientSecretExpiresAt: data.clientSecretExpiresAt,\n    };\n  }\n\n  /**\n   * Start device authorization for AWS Builder ID or IDC\n   */\n  async startDeviceAuthorization(\n    clientId: string,\n    clientSecret: string,\n    startUrl: string,\n    region: string = \"us-east-1\"","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/oauth/services/kiro.ts#L25-L61","documentation":"Error \"Failed to register client: ${error}\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/oauth/services/kiro.ts:43 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"}