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
{{ message }}
This repository has been archived by the owner on Nov 21, 2018. It is now read-only.
I think we should stop raising exceptions for every non-20x response. Instead, we should only be raising exceptions for server errors (50x) and timeouts.
If the downstream service returns a validation error or some other 40x error, it should be up to the consuming service to handle this gracefully. The only thing it doesn't have to handle gracefully on its own are timeouts and 50x errors.
To facilitate this, the Rester::Client should return a response object like so:
responce=Service.resources(id).getifresponse.successful?response[:key]# => access response data as hash keys.elseresponse[:error]# => type of errorresponse[:message]end
The text was updated successfully, but these errors were encountered:
I think we should stop raising exceptions for every non-20x response. Instead, we should only be raising exceptions for server errors (50x) and timeouts.
If the downstream service returns a validation error or some other 40x error, it should be up to the consuming service to handle this gracefully. The only thing it doesn't have to handle gracefully on its own are timeouts and 50x errors.
To facilitate this, the
Rester::Client
should return a response object like so:The text was updated successfully, but these errors were encountered: