I am using azure-core in the fog-azure-rm library. I am making two calls, first is get and the next one is put.
For the first get call, the response is an error which is as expected. This error is stored inside @retry_data in retry_policy.rb and is raised. When the next put call is sent, @retry_data still contains the error data and once again the error gets raised even though the response of the 'put' call is a success.
The error happens at this point => https://github.com/Azure/azure-ruby-asm-core/blob/c7f97f8ad46a7be1e9c71c23802c56cb4404047d/lib/azure/core/http/retry_policy.rb#L51
Shouldn't the error be raised like this?
if response && !response.success?
@retry_data[:error] = response.error
raise @retry_data[:error]
else
response
end
Please provide an explanation for this, thank you.
I am using
azure-core
in thefog-azure-rm
library. I am making two calls, first isget
and the next one isput
. For the firstget
call, the response is an error which is as expected. This error is stored inside@retry_data
inretry_policy.rb
and is raised. When the nextput
call is sent,@retry_data
still contains the error data and once again the error gets raised even though the response of the 'put' call is a success. The error happens at this point => https://github.com/Azure/azure-ruby-asm-core/blob/c7f97f8ad46a7be1e9c71c23802c56cb4404047d/lib/azure/core/http/retry_policy.rb#L51 Shouldn't the error be raised like this?Please provide an explanation for this, thank you.