diff --git a/packages/core/src/credentials/oidvc.ts b/packages/core/src/credentials/oidvc.ts index be629a1f..457304d1 100644 --- a/packages/core/src/credentials/oidvc.ts +++ b/packages/core/src/credentials/oidvc.ts @@ -23,6 +23,10 @@ export async function acquireOpenIDCredentialFromURI({ holderKeyDocument, }); + if (!response) { + throw new Error('Unable to acquire credential. Please check your credential offer and try again.'); + } + if (response.authorizationURL) { const authorizationCode = await getAuthCode(response.authorizationURL); response = await credentialServiceRPC.acquireOIDCredential({