@keywaysh/cli 0.0.18 → 0.0.19
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 +4 -7
- 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.19",
|
|
73
73
|
description: "One link to all your secrets",
|
|
74
74
|
type: "module",
|
|
75
75
|
bin: {
|
|
@@ -216,16 +216,13 @@ async function handleResponse(response) {
|
|
|
216
216
|
if (contentType.includes("application/json")) {
|
|
217
217
|
try {
|
|
218
218
|
const error = JSON.parse(text);
|
|
219
|
-
|
|
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);
|
|
219
|
+
throw new APIError(response.status, error.title || "Error", error.detail || `HTTP ${response.status}`, error.upgradeUrl);
|
|
223
220
|
} catch (e) {
|
|
224
221
|
if (e instanceof APIError) throw e;
|
|
225
|
-
throw new APIError(response.status, "
|
|
222
|
+
throw new APIError(response.status, "Error", text || `HTTP ${response.status}`);
|
|
226
223
|
}
|
|
227
224
|
}
|
|
228
|
-
throw new APIError(response.status, "
|
|
225
|
+
throw new APIError(response.status, "Error", text || `HTTP ${response.status}`);
|
|
229
226
|
}
|
|
230
227
|
if (!text) {
|
|
231
228
|
return {};
|