We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9688280 + 9d27385 commit a0fd40cCopy full SHA for a0fd40c
examples/typescript/watch/watch-example.ts
@@ -26,9 +26,13 @@ const req = await watch
26
}
27
console.log(apiObj);
28
},
29
- // done callback is called if the watch terminates normally
+ // done callback is called if the watch terminates either normally or with an error
30
(err) => {
31
- console.log(err);
+ if (err) {
32
+ console.error(err);
33
+ } else {
34
+ console.log('watch finished normally')
35
+ }
36
37
)
38
// watch returns a request object which you can use to abort the watch.
0 commit comments