appwrite / sdk-generator

Generating SDKs for multiple programming languages and platforms βš™οΈ

Home Page:https://appwrite.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ› Bug Report: DotNet sdk throws InvalidOperationException when answer from API has no content

KillTrot opened this issue Β· 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?

  • I checked and didn't find similar issue

🏒 Have you read the Code of Conduct?

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