File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -234,3 +234,20 @@ class PlotlyAccountError(PlotlyServerError):
234
234
235
235
class PlotlyRateLimitError (PlotlyServerError ):
236
236
pass
237
+
238
+
239
+ class ClosedConnection (PlotlyConnectionError ):
240
+ """Raised when the Plotly streaming server has disconnected."""
241
+ def __init__ (self , message , status_code = None ):
242
+ self .message = "[Code: {}] {}" .format (status_code , message )
243
+ self .status_code = status_code or None
244
+ super (ClosedConnection , self ).__init__ (self .message )
245
+
246
+
247
+ class TooManyConnectFailures (PlotlyConnectionError ):
248
+ """Raised when too many unsuccessful (re)connects were attempted"""
249
+ message = "Connecting or reconnecting to stream failed too many times."
250
+
251
+ def __init__ (self , message = None ):
252
+ message = message or self .message
253
+ super (TooManyConnectFailures , self ).__init__ (message )
You can’t perform that action at this time.
0 commit comments