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

🐛 Bug Report: DotNet sdk throws InvalidOperationException when answer from API has no content

Open KillTrot opened this issue 10 months ago • 1 comments

👟 Reproduction steps

Delete a document from the database using the dotnet sdk

👍 Expected behavior

No exception

👎 Actual Behavior

System.InvalidOperationException: "The given header was not found."

🎲 Appwrite version

Different version (specify in environment)

💻 Operating system

Linux

🧱 Your Environment

Appwrite: 1.5.x DotNet SDK: 0.8.1

👀 Have you spent some time to check if this issue has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

KillTrot avatar Apr 09 '24 02:04 KillTrot

The exception happens because the Header "Content-Type" is not present for responses from the Server without content. The .GetValues throws, as the header does not exist.

I will make a pull-request changing to .TryGetValues if thats okay

KillTrot avatar Apr 09 '24 02:04 KillTrot