@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 +16 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -23026,9 +23026,15 @@ var ApiTokenAuthProvider = class {
|
|
|
23026
23026
|
})
|
|
23027
23027
|
});
|
|
23028
23028
|
if (!authResponse.ok) {
|
|
23029
|
+
let errorData;
|
|
23030
|
+
try {
|
|
23031
|
+
errorData = await authResponse.json();
|
|
23032
|
+
} catch (e) {
|
|
23033
|
+
errorData = { message: authResponse.statusText };
|
|
23034
|
+
}
|
|
23029
23035
|
throw new AuthenticationError(
|
|
23030
|
-
`Key verification failed: ${authResponse.status}`,
|
|
23031
|
-
{ status: authResponse.status }
|
|
23036
|
+
errorData.message || errorData.error || `Key verification failed: ${authResponse.status}`,
|
|
23037
|
+
{ status: authResponse.status, data: errorData }
|
|
23032
23038
|
);
|
|
23033
23039
|
}
|
|
23034
23040
|
const authData = await authResponse.json();
|
|
@@ -23047,9 +23053,15 @@ var ApiTokenAuthProvider = class {
|
|
|
23047
23053
|
}
|
|
23048
23054
|
});
|
|
23049
23055
|
if (!validateResponse.ok) {
|
|
23056
|
+
let errorData;
|
|
23057
|
+
try {
|
|
23058
|
+
errorData = await validateResponse.json();
|
|
23059
|
+
} catch (e) {
|
|
23060
|
+
errorData = { message: validateResponse.statusText };
|
|
23061
|
+
}
|
|
23050
23062
|
throw new AuthenticationError(
|
|
23051
|
-
`Secondary validation failed: ${validateResponse.status}`,
|
|
23052
|
-
{ status: validateResponse.status }
|
|
23063
|
+
errorData.message || errorData.error || `Secondary validation failed: ${validateResponse.status}`,
|
|
23064
|
+
{ status: validateResponse.status, data: errorData }
|
|
23053
23065
|
);
|
|
23054
23066
|
}
|
|
23055
23067
|
const validateData = await validateResponse.json();
|