@odla-ai/cli 0.36.0 → 0.36.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/bin.cjs +3 -2
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-DBZQIMES.js → chunk-4QJ5NS64.js} +4 -3
- package/dist/chunk-4QJ5NS64.js.map +1 -0
- package/dist/{cli-BN6WLH5O.js → cli-BFGY7F6X.js} +2 -2
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-DBZQIMES.js.map +0 -1
- /package/dist/{cli-BN6WLH5O.js.map → cli-BFGY7F6X.js.map} +0 -0
package/dist/bin.cjs
CHANGED
|
@@ -401,9 +401,10 @@ async function mintDeviceSession(platformUrl, credential2, doFetch) {
|
|
|
401
401
|
});
|
|
402
402
|
const body = await response2.json().catch(() => ({}));
|
|
403
403
|
if (!response2.ok || typeof body.token !== "string") {
|
|
404
|
-
const
|
|
404
|
+
const revocable = response2.status === 401 || response2.status === 403 || response2.status === 404;
|
|
405
|
+
const detail = body.error?.message ?? (response2.ok ? `registry returned ${response2.status} with no session token` : `registry returned ${response2.status}`);
|
|
405
406
|
throw new Error(
|
|
406
|
-
`device session failed: ${detail} (${response2.status}) \u2014 if this machine's enrollment was revoked or has expired, enroll it again in Studio
|
|
407
|
+
`device session failed: ${detail} (${response2.status})` + (revocable ? " \u2014 if this machine's enrollment was revoked or has expired, enroll it again in Studio" : "")
|
|
407
408
|
);
|
|
408
409
|
}
|
|
409
410
|
return { token: body.token, expiresAt: body.expiresAt ?? Date.now() };
|