docusign / docusign-esign-ruby-client

The Official DocuSign Ruby Library used to interact with the eSign REST API. Send, sign, and approve documents using this client.
MIT License
66 stars 62 forks source link

No Error response on void envelope request #78

Open pramodtech opened 3 years ago

pramodtech commented 3 years ago

Request: ETHON: performed EASY effective_url=https://demo.docusign.net/restapi/v2.1/accounts/xxxxxx/envelopes/9316039f-7e71-483f-ae3b-d1613970505c response_code=0 return_code=ok total_time=0.000605

Response: #<DocuSign_eSign::ApiError: No error>

Body: #<DocuSign_eSign::Envelope:0x000055c0aa572f40 @status="voided", @voided_reason="Test">

Code:

def void_envelope(options = {})
  retry_count ||= 0
  envelope = DocuSign_eSign::Envelope.new
  envelope.status = 'voided'
  envelope.voided_reason = 'Test'
  envelope_api.update(account_id, options[:envelope_id], envelope)
rescue DocuSign_eSign::ApiError => e
  Rails.logger.info "exception #{e.inspect}"
  raise if retry_count > 0
  retry_count += 1
  retry
end

API Dashboard:

API logs

Skipping envelope_api definition code as it is standard instance method of DocuSign_eSign::EnvelopesApi I don't see any logs on DocuSign API Dashboard page. Same request works on retry. Same request works fine always with V2 version and no gem setup.

I am not sure how to debug this further without proper error details. Please help. Thanks.

pramodtech commented 3 years ago

Update: Seeing response_code=0 for different requests randomly. E.g update recipients ETHON: performed EASY effective_url=https://demo.docusign.net/restapi/v2.1/accounts/xxxx/envelopes/85597d68-2ea7-4386-813c-a9727e7e4ab1/recipients?resend_envelope=true response_code=0 return_code=ok total_time=0.000728

ETHON: performed EASY effective_url=https://demo.docusign.net/restapi/v2.1/accounts/xxxxx/envelopes/9316039f-7e71-483f-ae3b-d1613970505c response_code=0 return_code=ok total_time=0.000605

ETHON: performed EASY effective_url=https://demo.docusign.net/restapi/v2.1/accounts/xxxxx/envelopes/24c254a3-8124-45c7-a0c4-fd2342c9942a response_code=0 return_code=ok total_time=0.000544

pramodtech commented 3 years ago

Update: I tried replacing typhoeus gem with rest-client thinking response_code is somehow related to typhoeus gem. Here are my changes https://github.com/pramodtech/docusign-ruby-client/pull/1/files

This we deployed to our QA servers and it has been working fine, we don't see any errors and so we don't have to use retry option. Can someone please check if my analysis and changes makes sense and there is some issue with gem? Thanks.

gsnavin commented 3 years ago

@pramodtech thanks for bringing this to our attention, we will look into this issue internally and provide an update as soon as possible. Thanks for your patience.

ivdinkovds commented 3 years ago

@pramodtech I have updated DCM-5594 with the latest details from case #07555476. However, because this case is now closed, if you are able in the future to provide a reproducible error code example, please attach it here