@withgateway/sdk 0.2.2 → 0.2.3
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 +129 -22
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +130 -23
- package/dist/cli.mjs.map +1 -1
- package/dist/files/index.js +9 -5
- package/dist/files/index.js.map +1 -1
- package/dist/files/index.mjs +9 -5
- package/dist/files/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -8
- package/dist/index.mjs.map +1 -1
- package/dist/traces/index.js +9 -5
- package/dist/traces/index.js.map +1 -1
- package/dist/traces/index.mjs +9 -5
- package/dist/traces/index.mjs.map +1 -1
- package/dist/tracing/index.js +1 -1
- package/dist/tracing/index.js.map +1 -1
- package/dist/tracing/index.mjs +1 -1
- package/dist/tracing/index.mjs.map +1 -1
- package/dist/worlds/index.d.mts +7 -1
- package/dist/worlds/index.d.ts +7 -1
- package/dist/worlds/index.js +12 -7
- package/dist/worlds/index.js.map +1 -1
- package/dist/worlds/index.mjs +12 -7
- package/dist/worlds/index.mjs.map +1 -1
- package/package.json +1 -1
- package/runtime/gatewaysdk/environment/schema/skills/worlds-getting-started/SKILL.md +5 -5
- package/skills/worlds-getting-started/SKILL.md +5 -5
package/dist/files/index.js
CHANGED
|
@@ -199,13 +199,10 @@ async function apiRequest(options, method, path4, body) {
|
|
|
199
199
|
...body === void 0 ? {} : { body: JSON.stringify(body) }
|
|
200
200
|
});
|
|
201
201
|
const text = await res.text();
|
|
202
|
-
if (!res.ok)
|
|
203
|
-
throw new Error(
|
|
204
|
-
`${method} ${path4} -> ${res.status}: ${text.slice(0, 400)}`
|
|
205
|
-
);
|
|
206
|
-
}
|
|
202
|
+
if (!res.ok) throw new ApiError(res.status, method, path4, text.slice(0, 400));
|
|
207
203
|
return JSON.parse(text);
|
|
208
204
|
}
|
|
205
|
+
var ApiError;
|
|
209
206
|
var init_worlds = __esm({
|
|
210
207
|
"src/worlds/index.ts"() {
|
|
211
208
|
"use strict";
|
|
@@ -220,6 +217,13 @@ var init_worlds = __esm({
|
|
|
220
217
|
init_query();
|
|
221
218
|
init_migrate();
|
|
222
219
|
init_ingest();
|
|
220
|
+
ApiError = class extends Error {
|
|
221
|
+
constructor(status, method, path4, body) {
|
|
222
|
+
super(`${method} ${path4} -> ${status}: ${body}`);
|
|
223
|
+
this.status = status;
|
|
224
|
+
this.name = "ApiError";
|
|
225
|
+
}
|
|
226
|
+
};
|
|
223
227
|
}
|
|
224
228
|
});
|
|
225
229
|
|