TryYourSizeException
Every error the SDK raises: a stable code, a message and a doc link (like the web SDK).
Each error has a code (its wire value is the documented code), a message and a docUrl. Explanations: Mobile SDK errors.
SECRET_KEY_IN_APP"secret_key_in_app"OptionalA secret (sk_) or restricted (rk_) key was passed. Those belong on your server.
INVALID_KEY"invalid_key"OptionalNot a publishable key (pk_test_… / pk_live_…).
INVALID_APP_IDENTIFIER"invalid_app_identifier"OptionalThe package name can't be used as an app origin.
INVALID_OPTION"invalid_option"OptionalWINDOW_UNREACHABLE"window_unreachable"OptionalOur window did not answer (offline, or blocked).
APP_NOT_ALLOWED"app_not_allowed"OptionalThis app (android-app://<package>) is not registered for the key's store.
SIGN_IN_CANCELLED"sign_in_cancelled"OptionalSIGN_IN_UNAVAILABLE"sign_in_unavailable"OptionalSystem-browser sign-in is not available yet.
Example
Section titled “Example”try { tys = TryYourSize(context, key)} catch (e: TryYourSizeException) { if (e.code == TryYourSizeException.Code.SECRET_KEY_IN_APP) error("Use the pk_ key")}Was this page helpful?
Thank you. We read every answer.