Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/web/_web_auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ export class WebAuth implements Auth {
return;
}

if (this.apiKey.startsWith('auth_tokens/')) {
throw new Error('Ephemeral tokens are only supported by the live API.');
}

// Check if API key is empty or null
if (!this.apiKey) {
throw new Error('API key is missing. Please provide a valid API key.');
}

if (this.apiKey.startsWith('auth_tokens/')) {
throw new Error('Ephemeral tokens are only supported by the live API.');
}


headers.append(GOOGLE_API_KEY_HEADER, this.apiKey);
}
}