Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unauthorized after updating library dependency #103

Open
Ziocash opened this issue Oct 15, 2024 · 1 comment
Open

Unauthorized after updating library dependency #103

Ziocash opened this issue Oct 15, 2024 · 1 comment

Comments

@Ziocash
Copy link

Ziocash commented Oct 15, 2024

Describe the bug

  • Using IssuedDocumentsApi async methods return Unauthorized
  • Using IssuedDocumentsApi sync methods throw RestSharp RestClientSyncExtensions cannot be loaded

Env info

  • C# 11
  • C# SDK 2.1.0

To Reproduce

  • Example code:
var client = new IssuedDocumentsApi(_configuration);
var response = await client.ListIssuedDocumentsAsync(_options.CompanyId, "invoice");
return response;
  • Error status and message:
    401 - Unauthorized
  • Stacktrace:
It.FattureInCloud.Sdk.Client.ApiException: Error calling ListIssuedDocuments: {"error":{"message":"Unauthorized."}}
   at It.FattureInCloud.Sdk.Api.IssuedDocumentsApi.ListIssuedDocumentsWithHttpInfoAsync(Int32 companyId, String type, String fields, String fieldset, String sort, Nullable`1 page, Nullable`1 perPage, String q, Nullable`1 inclusive, Int32 operationIndex, CancellationToken cancellationToken)
   at It.FattureInCloud.Sdk.Api.IssuedDocumentsApi.ListIssuedDocumentsAsync(Int32 companyId, String type, String fields, String fieldset, String sort, Nullable`1 page, Nullable`1 perPage, String q, Nullable`1 inclusive, Int32 operationIndex, CancellationToken cancellationToken)
  • JSON representation of the request body
{"error":{"message":"Unauthorized."}}

Expected behavior
A list of issued documents from the called method

Screenshots
No screenshot

Additional context
RestSharp update to the latest version (112.1.0) to avoid GHSA-4rr6-2v9v-wcpc

@Ziocash
Copy link
Author

Ziocash commented Oct 15, 2024

Token is correct, i can use it calling API endpoints directly and getting 200 with response body

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant