@sphereon/oid4vci-client 0.19.0 → 0.19.1-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -319,10 +319,10 @@ async function handleCredentialOfferUri(uri) {
|
|
|
319
319
|
const decodedUri = isUriEncoded(credentialOfferUri) ? decodeURIComponent(credentialOfferUri) : credentialOfferUri;
|
|
320
320
|
const response = await fetch(decodedUri);
|
|
321
321
|
if (!(response && response.status >= 200 && response.status < 400)) {
|
|
322
|
-
return Promise.reject(`the credential offer URI endpoint call was not successful. http code ${response.status} - reason ${response.statusText}`);
|
|
322
|
+
return Promise.reject(Error(`the credential offer URI endpoint call was not successful. http code ${response.status} - reason ${response.statusText}`));
|
|
323
323
|
}
|
|
324
324
|
if (response.headers.get("Content-Type")?.startsWith("application/json") === false) {
|
|
325
|
-
return Promise.reject("the credential offer URI endpoint did not return content type application/json");
|
|
325
|
+
return Promise.reject(Error("the credential offer URI endpoint did not return content type application/json"));
|
|
326
326
|
}
|
|
327
327
|
return {
|
|
328
328
|
credential_offer: decodeJsonProperties(await response.json())
|