@vargai/gateway 0.2.0 → 0.2.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/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13603,7 +13603,7 @@ var JobResponse = exports_external.object({
|
|
|
13603
13603
|
created_at: exports_external.string(),
|
|
13604
13604
|
completed_at: exports_external.string().optional(),
|
|
13605
13605
|
output: exports_external.object({
|
|
13606
|
-
url: exports_external.string(),
|
|
13606
|
+
url: exports_external.string().optional(),
|
|
13607
13607
|
media_type: exports_external.string(),
|
|
13608
13608
|
metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
13609
13609
|
}).optional(),
|
|
@@ -14256,8 +14256,8 @@ async function executeJob(client, capability, params) {
|
|
|
14256
14256
|
throw new Error(`[${capability}] job ${completed.job_id} failed: ${completed.error || "unknown error"}`);
|
|
14257
14257
|
}
|
|
14258
14258
|
const output = completed.output;
|
|
14259
|
-
if (!output) {
|
|
14260
|
-
throw new Error(`${capability} completed but no output`);
|
|
14259
|
+
if (!output?.url) {
|
|
14260
|
+
throw new Error(`${capability} completed but no output URL`);
|
|
14261
14261
|
}
|
|
14262
14262
|
const res = await fetch(output.url);
|
|
14263
14263
|
if (!res.ok) {
|