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: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,9 +122,9 @@ __options__
122
122
123
123
## `handle( actorId, topic|type, command|event )`
124
124
125
-
Process a command or event and return a promise that resolves to the originating message, the actor snapshot and resulting events. The promise will reject if any problems occur while processing the message.
125
+
Process a command or event and return a promise that resolves to an array of objects that will contain the originating message, the actor snapshot and resulting events. The promise will reject if any problems occur while processing the message.
126
126
127
-
Successful resolution should provide a hash with the following structure:
127
+
Successful resolution should provide an array of hashes with the following structure:
128
128
```javascript
129
129
{
130
130
message: {}, // initiating command message
@@ -135,7 +135,7 @@ Successful resolution should provide a hash with the following structure:
135
135
}
136
136
```
137
137
138
-
Rejection will give an error object with the following structure:
138
+
Rejection will result in one or more hashes with the following structure:
139
139
```javascript
140
140
{
141
141
rejected:true,
@@ -146,7 +146,7 @@ Rejection will give an error object with the following structure:
146
146
}
147
147
```
148
148
149
-
> Note: the actor property will be a clone of the latest snapshot without the events applied.
149
+
> Note: in the event of an error, the state property will be a clone of the latest snapshot without the events applied.
0 commit comments