donobu 5.43.0 → 5.43.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.
@@ -33,7 +33,15 @@ class DonobuGptClient extends GptClient_1.GptClient {
33
33
  if (resp.status === 401) {
34
34
  throw new GptPlatformAuthenticationFailedException_1.GptPlatformAuthenticationFailedException(this.config.type);
35
35
  }
36
- else if (!resp.ok) {
36
+ // 402 Payment Required = the key is valid, but the account has no
37
+ // wallet / no credits. The credential itself authenticated fine, so
38
+ // accept the config — the user just can't run flows until they top up
39
+ // (Studio surfaces a "0 credits remaining" nudge). Rejecting here would
40
+ // block the managed donobu gpt-config from ever being created.
41
+ if (resp.status === 402) {
42
+ return;
43
+ }
44
+ if (!resp.ok) {
37
45
  throw new Error(`Donobu API ping failed with status ${resp.status}: ${await resp.text()}`);
38
46
  }
39
47
  }
@@ -33,7 +33,15 @@ class DonobuGptClient extends GptClient_1.GptClient {
33
33
  if (resp.status === 401) {
34
34
  throw new GptPlatformAuthenticationFailedException_1.GptPlatformAuthenticationFailedException(this.config.type);
35
35
  }
36
- else if (!resp.ok) {
36
+ // 402 Payment Required = the key is valid, but the account has no
37
+ // wallet / no credits. The credential itself authenticated fine, so
38
+ // accept the config — the user just can't run flows until they top up
39
+ // (Studio surfaces a "0 credits remaining" nudge). Rejecting here would
40
+ // block the managed donobu gpt-config from ever being created.
41
+ if (resp.status === 402) {
42
+ return;
43
+ }
44
+ if (!resp.ok) {
37
45
  throw new Error(`Donobu API ping failed with status ${resp.status}: ${await resp.text()}`);
38
46
  }
39
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "donobu",
3
- "version": "5.43.0",
3
+ "version": "5.43.1",
4
4
  "description": "Create browser automations with an LLM agent and replay them as Playwright scripts.",
5
5
  "main": "dist/main.js",
6
6
  "module": "dist/esm/main.js",