sdk-generator
sdk-generator copied to clipboard
fix-805-change-GetValues-to-TryGetValues-when-parsing-content-type-header
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
@adityaoberai, would you be able to help review?