sdk-generator icon indicating copy to clipboard operation
sdk-generator copied to clipboard

fix-805-change-GetValues-to-TryGetValues-when-parsing-content-type-header

Open KillTrot opened this issue 1 year ago • 1 comments

What does this PR do?

The DotNet SDK has a bug where the SDK throws an InvalidOperationException if the "Content-Type" header is not present in the response from Appwrite. This is the case if you for example delete a document. This PR changes the code to use TryGetValues which returns a boolean if it could successfully parse the header.

Fixes #805

Test Plan

I checked out the repository of the dotnet-sdk, made the proposed changes and tested.

Related PRs and Issues

  • #805

Have you read the Contributing Guidelines on issues?

I read the Contributing Guidelines

KillTrot avatar Apr 09 '24 03:04 KillTrot

@adityaoberai, would you be able to help review?

stnguyen90 avatar Apr 25 '24 18:04 stnguyen90