Closed vyndor closed 12 months ago
@vyndor many thanks! Do you plan to change the endpoint by re-instantiating client? Or we need a method for that?
@FZambia many thanks! Do you plan to change the endpoint by re-instantiating client? Or we need a method for that?
Yes, I create new instance of Client with new endpoint. Though it would be better to have an ability to change endpoint on the same instance of Client.
Description
Add HTTP response code to ErrorEvent. There is an alternative approach to this PR.
In my opinion it would be better to pass whole response to ErrorEvent, but it will expose okhttp in centrifuge API.
Why our project needs this
Our project needs an ability to change an endpoint in case of specific errors:
HTTP status codes currently does not exposed by centrifuge SDK, so we do not know when we need to change endpoint.