mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-23 11:34:44 -07:00
fix: improve error message when OAuth succeeds but project ID is required (#21070)
This commit is contained in:
@@ -80,6 +80,7 @@ import {
|
||||
type ConsentRequestPayload,
|
||||
type AgentsDiscoveredPayload,
|
||||
ChangeAuthRequestedError,
|
||||
ProjectIdRequiredError,
|
||||
CoreToolCallStatus,
|
||||
generateSteeringAckMessage,
|
||||
buildUserSteeringHintPrompt,
|
||||
@@ -771,6 +772,12 @@ export const AppContainer = (props: AppContainerProps) => {
|
||||
if (e instanceof ChangeAuthRequestedError) {
|
||||
return;
|
||||
}
|
||||
if (e instanceof ProjectIdRequiredError) {
|
||||
// OAuth succeeded but account setup requires project ID
|
||||
// Show the error message directly without "Failed to authenticate" prefix
|
||||
onAuthError(getErrorMessage(e));
|
||||
return;
|
||||
}
|
||||
onAuthError(
|
||||
`Failed to authenticate: ${e instanceof Error ? e.message : String(e)}`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user