Skip to content

Commit 29a7c9f

Browse files
committed
feat(google-one-tap): add new error code for Android activity unavailability
- Introduced 'E_ACTIVITY_UNAVAILABLE' to the GoogleSignInErrorCode type to handle cases where the Android activity is unavailable. - Updated documentation to clarify the meaning of each error code. Resolves: https://github.com/clerk/javascript/pull/7208/changes#r2607408175
1 parent 31f233d commit 29a7c9f

File tree

1 file changed

+8
-1
lines changed
  • packages/expo/src/google-one-tap

1 file changed

+8
-1
lines changed

packages/expo/src/google-one-tap/types.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,19 @@ export type OneTapResponse = OneTapSuccessResponse | CancelledResponse | NoSaved
147147

148148
/**
149149
* Error codes that can be thrown by the Google Sign-In module.
150+
*
151+
* - `SIGN_IN_CANCELLED`: User cancelled the sign-in flow
152+
* - `NO_SAVED_CREDENTIAL_FOUND`: No saved credentials available for One Tap
153+
* - `NOT_CONFIGURED`: Module not configured before use
154+
* - `GOOGLE_SIGN_IN_ERROR`: Generic Google Sign-In error
155+
* - `E_ACTIVITY_UNAVAILABLE`: Android activity unavailable (GoogleSignInActivityUnavailableException)
150156
*/
151157
export type GoogleSignInErrorCode =
152158
| 'SIGN_IN_CANCELLED'
153159
| 'NO_SAVED_CREDENTIAL_FOUND'
154160
| 'NOT_CONFIGURED'
155-
| 'GOOGLE_SIGN_IN_ERROR';
161+
| 'GOOGLE_SIGN_IN_ERROR'
162+
| 'E_ACTIVITY_UNAVAILABLE';
156163

157164
/**
158165
* Error thrown by the Google Sign-In module.

0 commit comments

Comments
 (0)