{"record":{"id":"d8cdc16418e0b62a","repo":"microg/GmsCore","slug":"pendingintent-or-createcredentialresponse-must-be","errorCode":null,"errorMessage":"pendingIntent or createCredentialResponse must be specified.","messagePattern":"pendingIntent or createCredentialResponse must be specified\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"play-services-identity-credentials/src/main/java/com/google/android/gms/identitycredentials/CreateCredentialHandle.java","lineNumber":43,"sourceCode":"@SafeParcelable.Class\npublic class CreateCredentialHandle extends AbstractSafeParcelable {\n    @Field(value = 1, getterName = \"getPendingIntent\")\n    @Nullable\n    private final PendingIntent pendingIntent;\n    @Field(value = 2, getterName = \"getCreateCredentialResponse\")\n    @Nullable\n    private final CreateCredentialResponse createCredentialResponse;\n\n    /**\n     * constructs an instance of {@link CreateCredentialHandle}\n     *\n     * @param pendingIntent            the {@link PendingIntent} to launch the credential selector UI\n     * @param createCredentialResponse the {@link CreateCredentialResponse} if no UI is needed\n     */\n    @Constructor\n    public CreateCredentialHandle(@Param(1) @Nullable PendingIntent pendingIntent, @Param(2) @Nullable CreateCredentialResponse createCredentialResponse) {\n        if (pendingIntent == null && createCredentialResponse == null) {\n            throw new IllegalArgumentException(\"pendingIntent or createCredentialResponse must be specified.\");\n        }\n        this.pendingIntent = pendingIntent;\n        this.createCredentialResponse = createCredentialResponse;\n    }\n\n    /**\n     * the {@link CreateCredentialResponse} if no UI is needed\n     */\n    @Nullable\n    public CreateCredentialResponse getCreateCredentialResponse() {\n        return createCredentialResponse;\n    }\n\n    /**\n     * the {@link PendingIntent} to launch the credential selector UI\n     */\n    @Nullable\n    public PendingIntent getPendingIntent() {","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/microg/GmsCore/blob/157c9d86ac46c195a86c2f15ab55c84036223f95/play-services-identity-credentials/src/main/java/com/google/android/gms/identitycredentials/CreateCredentialHandle.java#L25-L61","documentation":"Constructor validation in CreateCredentialHandle: both optional fields are unset — no pendingIntent and no createCredentialResponse — while at least one is required for the credential-selector flow to act on the handle.","triggerScenarios":"Thrown at play-services-identity-credentials/src/main/java/com/google/android/gms/identitycredentials/CreateCredentialHandle.java:43 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a non-null PendingIntent or CreateCredentialResponse when constructing the handle","Treat a null-both record as invalid and re-request the credential"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"157c9d86ac46c195a86c2f15ab55c84036223f95","analyzedAt":"2026-09-06T17:27:33.892Z","contentChangedAt":"2026-09-06T17:27:33.892Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}