@dora-cell/sdk 4.1.0 → 4.1.1

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.js CHANGED
@@ -23030,9 +23030,15 @@ var ApiTokenAuthProvider = class {
23030
23030
  })
23031
23031
  });
23032
23032
  if (!authResponse.ok) {
23033
+ let errorData;
23034
+ try {
23035
+ errorData = await authResponse.json();
23036
+ } catch (e) {
23037
+ errorData = { message: authResponse.statusText };
23038
+ }
23033
23039
  throw new AuthenticationError(
23034
- `Key verification failed: ${authResponse.status}`,
23035
- { status: authResponse.status }
23040
+ errorData.message || errorData.error || `Key verification failed: ${authResponse.status}`,
23041
+ { status: authResponse.status, data: errorData }
23036
23042
  );
23037
23043
  }
23038
23044
  const authData = await authResponse.json();
@@ -23051,9 +23057,15 @@ var ApiTokenAuthProvider = class {
23051
23057
  }
23052
23058
  });
23053
23059
  if (!validateResponse.ok) {
23060
+ let errorData;
23061
+ try {
23062
+ errorData = await validateResponse.json();
23063
+ } catch (e) {
23064
+ errorData = { message: validateResponse.statusText };
23065
+ }
23054
23066
  throw new AuthenticationError(
23055
- `Secondary validation failed: ${validateResponse.status}`,
23056
- { status: validateResponse.status }
23067
+ errorData.message || errorData.error || `Secondary validation failed: ${validateResponse.status}`,
23068
+ { status: validateResponse.status, data: errorData }
23057
23069
  );
23058
23070
  }
23059
23071
  const validateData = await validateResponse.json();