@kibibot/cli 1.0.6 → 1.0.7

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/lib/api.js +7 -1
  2. package/package.json +1 -1
package/dist/lib/api.js CHANGED
@@ -32,8 +32,14 @@ function friendlyError(err) {
32
32
  return err.body?.detail || 'Access denied. Your API key may not have the required permissions.';
33
33
  case 404:
34
34
  return err.body?.detail || 'Not found.';
35
- case 429:
35
+ case 429: {
36
+ const detail = err.body?.detail;
37
+ if (typeof detail === 'object' && detail !== null && 'message' in detail)
38
+ return detail.message;
39
+ if (typeof detail === 'string')
40
+ return detail;
36
41
  return 'Rate limited. Try again later.';
42
+ }
37
43
  default:
38
44
  if (err.statusCode >= 500) {
39
45
  return 'Server error. Try again later.';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kibibot/cli",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "KibiBot CLI — deploy tokens, check balances, and manage your AI agent from the terminal",
5
5
  "type": "module",
6
6
  "bin": {