diegosouzapw/OmniRoute · error
API key is required
Error message
API key is required
What it means
Error "API key is required" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/lib/oauth/services/kiro.ts:522
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";
assertValidAwsRegion(region);
const accessToken = apiKey.trim();
if (!accessToken) {
throw new Error("API key is required");
}
let profileArn: string | null = null;
try {
profileArn = await this.listAvailableProfiles(accessToken, region);
} catch (error: any) {
const message = String(error?.message || error || "");
const isApiKeyProfileDenied =
message.includes("AccessDeniedException") &&
message.includes("API key authentication is not supported for this operation");
if (!isApiKeyProfileDenied) {
throw error;
}
}
return {
accessToken,
refreshToken: null,View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/lib/oauth/services/kiro.ts:522 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/e25a4471deae4d83.
Report an issue: GitHub.