Closed yarcub closed 5 years ago
Iām really sorry for such a delay in getting back to you and thanks for submitting an issue. This issue was fixed in the latest versions of the library: https://github.com/pusher/pusher-http-ruby/blob/master/lib/pusher/request.rb#L83-L100, therefore Iām going to close it.
Hi š
I'm trying to handle failure calls to
trigger
due to message exceeding 10KB. From my understanding REST API will respond with a413
HTTP status code but this library doesn't expose it.https://github.com/pusher/pusher-http-ruby/blob/86e613ffb887d9e4d386b1cdc005dde1757449f6/lib/pusher/request.rb#L83-L100
It raises an unknown error with the message
Unknown error (status code 413): #{body}
Imo, it's a know error (payload too big) and now the only way we can correctly handle/report it is by checking if the message for
(status code 413)
which seems far from ideal.What are you thoughts on this? Should it raise a more specific error?