@keywaysh/cli 0.0.17 → 0.0.18
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/cli.js +5 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -69,7 +69,7 @@ var INTERNAL_POSTHOG_HOST = "https://eu.i.posthog.com";
|
|
|
69
69
|
// package.json
|
|
70
70
|
var package_default = {
|
|
71
71
|
name: "@keywaysh/cli",
|
|
72
|
-
version: "0.0.
|
|
72
|
+
version: "0.0.18",
|
|
73
73
|
description: "One link to all your secrets",
|
|
74
74
|
type: "module",
|
|
75
75
|
bin: {
|
|
@@ -216,7 +216,10 @@ async function handleResponse(response) {
|
|
|
216
216
|
if (contentType.includes("application/json")) {
|
|
217
217
|
try {
|
|
218
218
|
const error = JSON.parse(text);
|
|
219
|
-
|
|
219
|
+
const errorCode = error.error || error.title || "http_error";
|
|
220
|
+
const errorMessage = error.message || error.detail || `HTTP ${response.status}`;
|
|
221
|
+
const upgradeUrl = error.upgrade_url || error.upgradeUrl;
|
|
222
|
+
throw new APIError(response.status, errorCode, errorMessage, upgradeUrl);
|
|
220
223
|
} catch (e) {
|
|
221
224
|
if (e instanceof APIError) throw e;
|
|
222
225
|
throw new APIError(response.status, "http_error", text || `HTTP ${response.status}`);
|