@kibibot/cli 1.0.16 → 1.0.17

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.
@@ -124,6 +124,7 @@ export function registerToken(program) {
124
124
  console.log(` Check status with: ${chalk.cyan(`kibi status ${result.job_id}`)}`);
125
125
  }
126
126
  catch (err) {
127
+ ora().fail('Token creation failed');
127
128
  handleApiError(err);
128
129
  }
129
130
  });
package/dist/lib/api.js CHANGED
@@ -40,11 +40,19 @@ function friendlyError(err) {
40
40
  return detail;
41
41
  return 'Rate limited. Try again later.';
42
42
  }
43
- default:
43
+ default: {
44
44
  if (err.statusCode >= 500) {
45
45
  return 'Server error. Try again later.';
46
46
  }
47
- return err.body?.detail || err.message || `HTTP ${err.statusCode}`;
47
+ const detail = err.body?.detail;
48
+ if (typeof detail === 'string')
49
+ return detail;
50
+ if (typeof detail === 'object' && detail !== null) {
51
+ const d = detail;
52
+ return d.message || d.error || JSON.stringify(detail);
53
+ }
54
+ return err.message || `HTTP ${err.statusCode}`;
55
+ }
48
56
  }
49
57
  }
50
58
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kibibot/cli",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "KibiBot CLI — deploy tokens, check balances, and manage your AI agent from the terminal",
5
5
  "type": "module",
6
6
  "bin": {