@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 CHANGED
@@ -373,10 +373,10 @@ async function handleCredentialOfferUri(uri) {
373
373
  const decodedUri = isUriEncoded(credentialOfferUri) ? decodeURIComponent(credentialOfferUri) : credentialOfferUri;
374
374
  const response = await (0, import_cross_fetch.fetch)(decodedUri);
375
375
  if (!(response && response.status >= 200 && response.status < 400)) {
376
- return Promise.reject(`the credential offer URI endpoint call was not successful. http code ${response.status} - reason ${response.statusText}`);
376
+ return Promise.reject(Error(`the credential offer URI endpoint call was not successful. http code ${response.status} - reason ${response.statusText}`));
377
377
  }
378
378
  if (response.headers.get("Content-Type")?.startsWith("application/json") === false) {
379
- return Promise.reject("the credential offer URI endpoint did not return content type application/json");
379
+ return Promise.reject(Error("the credential offer URI endpoint did not return content type application/json"));
380
380
  }
381
381
  return {
382
382
  credential_offer: (0, import_oid4vci_common7.decodeJsonProperties)(await response.json())