@rool-dev/client 0.5.3-dev.e08c139 → 0.5.4-dev.7f576bd

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/README.md +16 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -670,6 +670,22 @@ space.on('objectUpdated', ({ objectId, object, source }) => {
670
670
  space.updateObject(objectId, { prompt: 'expand this' });
671
671
  ```
672
672
 
673
+ ### Error Handling
674
+
675
+ AI operations may fail due to rate limiting or other transient errors. Check `error.message` for user-friendly error text:
676
+
677
+ ```typescript
678
+ try {
679
+ await space.updateObject(objectId, { prompt: 'expand this' });
680
+ } catch (error) {
681
+ if (error.message.includes('temporarily unavailable')) {
682
+ showToast('Service busy, please try again in a moment');
683
+ } else {
684
+ showToast(error.message);
685
+ }
686
+ }
687
+ ```
688
+
673
689
  ### Internal / Advanced
674
690
 
675
691
  | Method | Description |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rool-dev/client",
3
- "version": "0.5.3-dev.e08c139",
3
+ "version": "0.5.4-dev.7f576bd",
4
4
  "description": "TypeScript client library for the Rool API",
5
5
  "packageManager": "pnpm@10.17.1",
6
6
  "type": "module",