File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ StreamdataClient.createRxJavaClient(apiURL, appKey)
104
104
} else if (event.isPatch()) {
105
105
this.processData(event.getPatch(), event.getSnapshot())
106
106
} else if (event.isError()) {
107
- throw new RuntimeException(event.getError()); # <6>
107
+ throw new RuntimeException(event.getError().toString()); # <6>
108
108
}
109
109
}, err -> logger.error(err.getMessage(), err));
110
110
@@ -114,4 +114,21 @@ StreamdataClient.createRxJavaClient(apiURL, appKey)
114
114
<3> Same as above
115
115
<4> Once configured you can start manipulating you data
116
116
<5> An example without using any rx operators before show you available methods on event
117
- <6> Shis will stop the flowable and disconnect the event source
117
+ <6> Shis will stop the flowable and disconnect the event source
118
+
119
+ == Errors
120
+
121
+ Errors not a simple string. It is JSON !
122
+
123
+ Above, an example of an error so you can get more detailed informations
124
+
125
+ [JSON]
126
+ ```
127
+ {
128
+ "status":2005,
129
+ "cause":"An error occurred while streaming http://stockmarket.streamdata.io/priceshttp://stockmarket.streamdata.io/prices. : HTTP/1.1 404 ",
130
+ "message":"HTTP error. The Http response cannot be processed.",
131
+ "timestamp":1512566770744,
132
+ "sessionId":"62fd67bc-d090-4333-a783-d94b366f55f4"
133
+ }
134
+ ```
You can’t perform that action at this time.
0 commit comments