-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Labels
bugSomething isn't working. It's clear that this does need to be fixed.Something isn't working. It's clear that this does need to be fixed.
Description
When trying to figure out the failure cases for Channel.publish, I found that
if the method receives a series of 500 requests greater than the retry count,
the method won't raise an error and will instead return None.
This means that to check for all errors with Channel.publish we need to write:
channel = ably.channels.get(channel)
res = channel.publish(...)
if res is None:
raise requests.ConnectionErrorInstead of:
channel = ably.channels.get(channel)
channel.publish(...)I think the method should be updated to raise an exception after
exhausting all retry attempts.
Something like:
diff --git a/ably/http/http.py b/ably/http/http.py
index 6e7bbbb..ea8067b 100644
--- a/ably/http/http.py
+++ b/ably/http/http.py
@@ -217,6 +217,7 @@ class Http:
except AblyException as e:
if not e.is_server_error:
raise e
+ raise AblyException(message="", status_code=0, code=0)
def delete(self, url, headers=None, skip_auth=False, timeout=None):
return self.make_request('DELETE', url, headers=headers,Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't working. It's clear that this does need to be fixed.Something isn't working. It's clear that this does need to be fixed.