Hello, while trying to update a record an Exception of type NullReferenceException.
After debugging the exception is thrown when calling the Update method in Builder class while initializing the QueryFilter object whit a null criteria the Helper method GetPropertyValue doesn't retrieve the value of the primary key property it returns null.
I figured it out instead of using the Helper method I used the PrimaryKeyValue Property of the model and worked perfectly. I submitted a PR :relaxed: for this case if is it ok.
Second thing is when trying to update a non-existing user another exception is thrown of type JsonSerializationException. The issue is the Postgrest returns an empty array "[]" when trying to update a non-existing record and the Helper method MakeRequest when not a success status code is returned tries to deserialize the response content to an ErrorResponse object, an empty array cannot be deserialized to ErrorResponse.
Thank you.
To Reproduce
Retrieve a user
var user= await client.Builder<User>().Filter("username", Postgrest.Constants.Operator.Equals, "supabot").Single();
Bug report
Describe the bug
Hello, while trying to update a record an Exception of type NullReferenceException. After debugging the exception is thrown when calling the Update method in Builder class while initializing the QueryFilter object whit a null criteria the Helper method GetPropertyValue doesn't retrieve the value of the primary key property it returns null. I figured it out instead of using the Helper method I used the PrimaryKeyValue Property of the model and worked perfectly. I submitted a PR :relaxed: for this case if is it ok.
Second thing is when trying to update a non-existing user another exception is thrown of type JsonSerializationException. The issue is the Postgrest returns an empty array "[]" when trying to update a non-existing record and the Helper method MakeRequest when not a success status code is returned tries to deserialize the response content to an ErrorResponse object, an empty array cannot be deserialized to ErrorResponse.
Thank you.
To Reproduce
Expected behavior
System information