sdk-generator
sdk-generator copied to clipboard
🐛 Bug Report: DotNet sdk throws InvalidOperationException when answer from API has no content
👟 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?
- [X] I have 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