Skip to content

Commit 96fa186

Browse files
committed
docs: include minor API changes for handle call in README
1 parent f28d19c commit 96fa186

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ __options__
122122

123123
## `handle( actorId, topic|type, command|event )`
124124

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.
126126

127-
Successful resolution should provide a hash with the following structure:
127+
Successful resolution should provide an array of hashes with the following structure:
128128
```javascript
129129
{
130130
message: {}, // initiating command message
@@ -135,7 +135,7 @@ Successful resolution should provide a hash with the following structure:
135135
}
136136
```
137137

138-
Rejection will give an error object with the following structure:
138+
Rejection will result in one or more hashes with the following structure:
139139
```javascript
140140
{
141141
rejected: true,
@@ -146,7 +146,7 @@ Rejection will give an error object with the following structure:
146146
}
147147
```
148148

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.
150150
151151
## Documentation
152152

0 commit comments

Comments
 (0)