@tinycloud/cli 1.2.0-beta.9 → 1.2.1-beta.0
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/legacy-entry.js
CHANGED
|
@@ -7263,14 +7263,12 @@ async function responseError(service, message, response) {
|
|
|
7263
7263
|
}
|
|
7264
7264
|
} catch {
|
|
7265
7265
|
}
|
|
7266
|
-
|
|
7266
|
+
return serviceError(
|
|
7267
|
+
response.status === 408 || response.status === 504 ? ErrorCodes.TIMEOUT : ErrorCodes.NETWORK_ERROR,
|
|
7268
|
+
`${message}: ${response.status} ${detail}`,
|
|
7267
7269
|
service,
|
|
7268
|
-
|
|
7270
|
+
{ meta: { status: response.status, statusText: response.statusText } }
|
|
7269
7271
|
);
|
|
7270
|
-
return {
|
|
7271
|
-
...error,
|
|
7272
|
-
meta: { ...error.meta, status: response.status, statusText: response.statusText }
|
|
7273
|
-
};
|
|
7274
7272
|
}
|
|
7275
7273
|
async function* parseSseStream(body, signal) {
|
|
7276
7274
|
if (!body) {
|
|
@@ -20400,7 +20398,7 @@ async function delegationFromInput(input, did, options) {
|
|
|
20400
20398
|
redirect: "error"
|
|
20401
20399
|
});
|
|
20402
20400
|
if (!response.ok) {
|
|
20403
|
-
throw new Error(response.status === 404 ? "Delegation code not found or expired. Use the full code shown in OpenKey instead." : `Could not retrieve delegation code (HTTP ${response.status}).`);
|
|
20401
|
+
throw Object.assign(new Error(response.status === 404 ? "Delegation code not found or expired. Use the full code shown in OpenKey instead." : `Could not retrieve delegation code (HTTP ${response.status}).`), { status: response.status });
|
|
20404
20402
|
}
|
|
20405
20403
|
const result = await response.json();
|
|
20406
20404
|
parsed = result.delegation;
|