@prismnetwork/agent-sdk 0.6.0 → 0.6.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/package.json +1 -1
- package/prism.mjs +4 -1
package/package.json
CHANGED
package/prism.mjs
CHANGED
|
@@ -325,7 +325,10 @@ export class PrismAgent {
|
|
|
325
325
|
return res.body;
|
|
326
326
|
}
|
|
327
327
|
if (res.status !== 404 && res.status !== 429 && res.status < 500) {
|
|
328
|
-
|
|
328
|
+
// The control plane names the reason in `code`; without it a lease that
|
|
329
|
+
// will never open access reports as a generic `access_error` and the
|
|
330
|
+
// caller has to go and read the body to learn anything.
|
|
331
|
+
throw new PrismError(res.status, res.body?.error ?? res.body?.code ?? "access_error", res.body);
|
|
329
332
|
}
|
|
330
333
|
await sleep(intervalMs);
|
|
331
334
|
}
|