You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pusher endpoints return HTTP 413 'Content Too Large' when client sends too much data.
If data is too large, you should not retry to send it again. But the code here suggests to retry.
It's because Result#fromHttpCode has no special case for 413, it is classified as UNKNOWN_ERROR, and UNKNOWN_ERROR has shouldRetry set to true.
I see 2 ways to fix:
Assign 413 to one of existing enum types, like CLIENT_ERROR, where shouldRetry is false
Create a new enum entry for Status, CONTENT_TOO_LARGE, with shouldRetry set to false
I suggest choosing 1, as I think it's safe from logic point of view (sending too large content is very much like sending an invalid content), and is backward compatible from binary point of view.
If you choose 2, this should be a minor or even major version update, according to semantic versioning.
The text was updated successfully, but these errors were encountered:
Pusher endpoints return HTTP 413 'Content Too Large' when client sends too much data.
If data is too large, you should not retry to send it again. But the code here suggests to retry.
It's because
Result#fromHttpCode
has no special case for 413, it is classified asUNKNOWN_ERROR
, andUNKNOWN_ERROR
hasshouldRetry
set totrue
.I see 2 ways to fix:
shouldRetry
isfalse
shouldRetry
set tofalse
I suggest choosing 1, as I think it's safe from logic point of view (sending too large content is very much like sending an invalid content), and is backward compatible from binary point of view.
If you choose 2, this should be a minor or even major version update, according to semantic versioning.
The text was updated successfully, but these errors were encountered: