MCPcopy Index your code
hub / github.com/ryanmcgrath/twython / on_error

Method on_error

twython/streaming/api.py:179–194  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 """

Callers 2

_sendMethod · 0.95
_requestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected