|
Post by AMI_archerwen on May 4, 2022 8:40:46 GMT
Hi,
When we PATCH "null" value for some updateable property (except array type). How do we response for user? Return 400 + PropertyValueError message or 200 + NoOperation message or 204. Could you provide the suggestion?
Thanks, Archer.
|
|
|
Post by jautor on May 4, 2022 18:01:23 GMT
I would expect that to be a 400 + PropertyValueTypeError since NULL is a different data type. I also wouldn't expect many cases where a null-able property would actually support a NULL value as a PATCH (since NULL is generally an error condition - or used for values of sensitive data properties like passwords).
Jeff
|
|
|
Post by AMI_archerwen on Sept 5, 2022 7:53:45 GMT
Hi,
One more question. Like POST action or Creation, it also not expect any property given the "null" value right? And we still can shows the message like PropertyValueTypeError (For Creation) & ActionParameterValueTypeError (For Action)?
Thanks, Archer.
|
|
|
Post by mraineri on Sept 6, 2022 13:01:46 GMT
That's correct; you can use those same messages for that very case.
|
|
|
Post by AMI_archerwen on Sept 7, 2022 10:06:32 GMT
Thanks for the reply.
|
|