Called when stream returns non-200 status code Feel free to override this to handle your streaming data how you want it handled. :param status_code: Non-200 status code sent from stream :type status_code: int :param data: Error message sent from stream
(self, status_code, data, headers=None)
| 177 | return True |
| 178 | |
| 179 | def on_error(self, status_code, data, headers=None): # pragma: no cover |
| 180 | """Called when stream returns non-200 status code |
| 181 | |
| 182 | Feel free to override this to handle your streaming data how you |
| 183 | want it handled. |
| 184 | |
| 185 | :param status_code: Non-200 status code sent from stream |
| 186 | :type status_code: int |
| 187 | |
| 188 | :param data: Error message sent from stream |
| 189 | :type data: dict |
| 190 | |
| 191 | :param headers: Response headers sent from the stream (i.e. Retry-After) |
| 192 | :type headers: dict |
| 193 | """ |
| 194 | return |
| 195 | |
| 196 | def on_timeout(self): # pragma: no cover |
| 197 | """ Called when the request has timed out """ |