docusign / docusign-esign-csharp-client

The Official Docusign C# Client Library used to interact with the eSignature REST API. Send, sign, and approve documents using this client.
https://developers.docusign.com/docs/esign-rest-api/sdks/csharp/
MIT License
129 stars 159 forks source link

ListFolders Unhandled Response Type Exception #252

Open Fabioh opened 4 years ago

Fabioh commented 4 years ago

I'm trying to list the folders in account using the SDK, with the following code snippet.

var foldersApi = new FoldersApi(ApiClient.Configuration);
var listOptions = new FoldersApi.ListOptions
{
        include = obterPastasDTO.Tipo.ToString()
};
var resultFolders = foldersApi.List(Account.AccountId, listOptions);

But the method is throwing the same exception that was occuring in the issue https://github.com/docusign/docusign-csharp-client/issues/141.

Could you help to some this problem?

LarryKlugerDS commented 4 years ago

I'm sorry you're having this problem. Can you provide the full stack trace of the exception? Please provide it as text, not as a screenshot.

Also: What version of the C# SDK are you using? If you're not already, can you try with the current version, v4.1.1?

Thanks, Larry

Fabioh commented 4 years ago

@LarryKlugerDS this issue is random.

image

The stack trace:

[ApiException: Unhandled response type.]
   DocuSign.eSign.Client.ApiClient.Deserialize(Byte[] content, Type type, IList`1 headers) +277
   DocuSign.eSign.Api.FoldersApi.ListWithHttpInfo(String accountId, ListOptions options) +3163
   DocuSign.eSign.Api.FoldersApi.List(String accountId, ListOptions options) +79
   Anapro.BusinessLayer.Unmapped.Integracao.AssinaturaDigital.AssinaturaDigitalDocuSign.ObterPasta(ObterPastasDTO obterPastasDTO) in D:\dev\trabalho\git\gestao-vendas\SistemaAnapro\Business\BusinessLayer\Unmapped\Integracao\AssinaturaDigital\AssinaturaDigitalDocuSign.cs:46
   integracao_assinaturadigital_VincularModelos.PerssistirViewStateIdPastaConstrutora() in d:\dev\trabalho\git\gestao-vendas\SistemaAnapro\AnaproWeb\integracao\assinaturadigital\VincularModelos.aspx.cs:140
   integracao_assinaturadigital_VincularModelos.Page_Load(Object sender, EventArgs e) in d:\dev\trabalho\git\gestao-vendas\SistemaAnapro\AnaproWeb\integracao\assinaturadigital\VincularModelos.aspx.cs:72
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +154
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4082

I am using the version 4.1.1 o nuget package DocuSign.eSign.dll