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
{{ message }}
This repository was archived by the owner on Dec 21, 2021. It is now read-only.
Error handling of getStream/createStream/etc. (#208)
createStream, getStream, getStreamByName and getOrCreateStream reject the promise if there is an API error.
To support this functionality, a new errorCode field was added to AuthFetchError. Currently the ErrorCode enum lists the most typical API error codes: VALIDATION_ERROR and NOT_FOUND. Other codes can be added later, if needed.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -303,7 +303,7 @@ All the below functions return a Promise which gets resolved with the result.
303
303
| getStream(streamId) | Fetches a stream object from the API. |
304
304
| listStreams(query) | Fetches an array of stream objects from the API. For the query params, consult the [API docs](https://api-explorer.streamr.com). |
305
305
| getStreamByName(name) | Fetches a stream which exactly matches the given name. |
306
-
| createStream(properties) | Creates a stream with the given properties. For more information on the stream properties, consult the [API docs](https://api-explorer.streamr.com). |
306
+
| createStream(\[properties])| Creates a stream with the given properties. For more information on the stream properties, consult the [API docs](https://api-explorer.streamr.com). |
307
307
| getOrCreateStream(properties) | Gets a stream with the id or name given in `properties`, or creates it if one is not found. |
308
308
| publish(streamId, message, timestamp, partitionKey) | Publishes a new message to the given stream. |
0 commit comments