You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/actors.mdx
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -410,6 +410,40 @@ Callback actors are a bit different from other actors in that they do not do the
410
410
- Do not emit values when used with `.subscribe()`
411
411
- Can not be stopped with `.stop()`
412
412
413
+
You may choose to use `sendBack` to report caught errors to the parent actor. This is especially helpful for handling promise rejections within a callback function, which will not be caught by [`onError`](invoke.mdx#onerror).
414
+
415
+
Callback functions cannot be `async` functions. But it is possible to execute a Promise within a callback function.
Higher-level actor logic enhances existing actor logic with additional functionality. For example, you can create actor logic that logs or persists actor state:
0 commit comments