diegosouzapw/OmniRoute · error
Failed to list profiles: ${error}
Error message
Failed to list profiles: ${error} What it means
Error "Failed to list profiles: ${error}" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/lib/oauth/services/kiro.ts:500
region === "us-east-1"
? "https://codewhisperer.us-east-1.amazonaws.com"
: `https://q.${region}.amazonaws.com`;
const response = await fetch(endpoint, {
method: "POST",
headers: {
Authorization: `Bearer ${accessToken}`,
"Content-Type": "application/x-amz-json-1.0",
"x-amz-target": "AmazonCodeWhispererService.ListAvailableProfiles",
Accept: "application/json",
tokentype: "API_KEY",
},
body: JSON.stringify({ maxResults: 10 }),
});
if (!response.ok) {
const error = await response.text();
throw new Error(`Failed to list profiles: ${error}`);
}
const data = await response.json();
const profiles = Array.isArray(data?.profiles) ? data.profiles : [];
const arnOf = (profile: any) => profile?.arn || profile?.profileArn || null;
const match =
profiles.find((profile: any) => String(arnOf(profile) || "").includes(`:${region}:`)) ||
profiles[0];
return arnOf(match);
}
/**
* Normalize a long-lived Kiro/CodeWhisperer API key.
*/
async validateApiKey(apiKey: string, regionInput?: string) {
// Default kept OUT of the parameter list: check-public-creds' CRED_KEY_RE matches the
// `apiKey:` annotation and flags any string literal in the signature (fn-param FP class).
const region = regionInput || "us-east-1";View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/lib/oauth/services/kiro.ts:500 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/6f192ea564d14a2b.
Report an issue: GitHub.