@oya-ai/cli 1.0.78 → 1.0.79

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -170,7 +170,7 @@ var Browser = class {
170
170
  { messages: [{ role: "user", content: prompt }], data, secrets },
171
171
  6e5
172
172
  );
173
- if (res.error) throw new OyaError(res.error, 500, res);
173
+ if (res.error) throw new OyaError(res.error, res.status ?? 500, res);
174
174
  return res.text;
175
175
  }
176
176
  /**
@@ -195,7 +195,7 @@ var Browser = class {
195
195
  { variables: data, autoHeal },
196
196
  6e5
197
197
  );
198
- if (res.error) throw new OyaError(res.error, 500, res);
198
+ if (res.error) throw new OyaError(res.error, res.status ?? 500, res);
199
199
  return res;
200
200
  }
201
201
  /**
@@ -338,7 +338,7 @@ var Run = class {
338
338
  return result;
339
339
  }
340
340
  if (run2.status === "failed") {
341
- const failure = new OyaError(run2.error || "Run failed", 500, run2);
341
+ const failure = new OyaError(run2.error || "Run failed", run2.errorStatus ?? 500, run2);
342
342
  await call(() => cb.onFailure?.(failure));
343
343
  throw failure;
344
344
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oya-ai/cli",
3
- "version": "1.0.78",
3
+ "version": "1.0.79",
4
4
  "description": "Command line for the Oya browser control plane.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://browser.getoya.ai",
@@ -39,7 +39,7 @@
39
39
  "access": "public"
40
40
  },
41
41
  "devDependencies": {
42
- "@oya-ai/browser": "1.0.78",
42
+ "@oya-ai/browser": "1.0.79",
43
43
  "@types/node": "^20.19.43",
44
44
  "tsup": "^8.0.0",
45
45
  "typescript": "^5.4.0"