@meistrari/auth-core 1.39.1 → 1.39.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.mjs +3 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -21,7 +21,7 @@ function isTokenExpired(token, expiresInMs) {
|
|
|
21
21
|
return nowInSeconds > expirationTime;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
const version = "1.39.
|
|
24
|
+
const version = "1.39.2";
|
|
25
25
|
|
|
26
26
|
function parsedEnumValues(schema) {
|
|
27
27
|
return Object.fromEntries(
|
|
@@ -1271,7 +1271,8 @@ function parseErrorMessage(error) {
|
|
|
1271
1271
|
return "Failed to exchange device code for tokens";
|
|
1272
1272
|
}
|
|
1273
1273
|
const candidateError = error;
|
|
1274
|
-
|
|
1274
|
+
const nested = typeof candidateError.error === "string" ? candidateError.error : candidateError.error?.message;
|
|
1275
|
+
return candidateError.message ?? nested ?? "Failed to exchange device code for tokens";
|
|
1275
1276
|
}
|
|
1276
1277
|
function throwDeviceGrantError(error) {
|
|
1277
1278
|
const code = parseErrorCode(error);
|