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
api_client.crm.contacts.basic_api.get_by_id(contact_id: 123)# => raises an `Hubspot::Crm::Contacts::ApiError` error with status code 404
Using retry config:
retry_config={429=>{max_retries: 3,seconds_delay: 5},500..530=>{max_retries: 2,seconds_delay: 10}}response=api_client.crm.contacts.basic_api.get_by_id(contact_id: 123,retry: retry_config)# => does not raise error but returns instance insteadresponse.is_a?(Hubspot::Crm::Contacts::ApiError)=>trueresponse.code=>404
I don't think it is good that gem behaves like this. Just because you start using retries suddenly it no longer raises exceptions and that is not expected at all.
Example, method like this doesn't work anymore if you add retry block
I don't actually mind if gem returns error response or actually raises an error. I just expect that the interface will behave the same regardless of whether retry option is used or not.
Example:
Without using retry config:
Using retry config:
I don't think it is good that gem behaves like this. Just because you start using retries suddenly it no longer raises exceptions and that is not expected at all.
Example, method like this doesn't work anymore if you add retry block
I don't actually mind if gem returns error response or actually raises an error. I just expect that the interface will behave the same regardless of whether retry option is used or not.
Related to
hubspot-api-ruby/lib/hubspot/discovery/base_api_client.rb
Lines 101 to 125 in c1dbc58
The text was updated successfully, but these errors were encountered: