|
Post by ratagupt on Feb 22, 2019 15:32:15 GMT
Hi Jeff,
In case of PATCH request having multiple properties, What should be the behaviour if few gets updated and other throws error.
What would be the status code for the overall transaction? How does the user knows which property gets updated or which property throws error.
Here is what I got from the specification ==========================
In the case of a request including modification to several properties, if one or more properties in the request can never be updated, such as when a property is read only, unknown, or unsupported, an HTTP status code of 200 shall be returned along with a representation of the resource containing a Message annotation specifying the non-updatable properties. In this success case, other properties may be updated in the resource. =================================
Should we send 5xx(server error) and the extended error for the properties which has not been updated?
Ratan
|
|
|
Post by jautor on Feb 22, 2019 23:06:32 GMT
You've got the right section of the specification quoted there.
You would respond with HTTP 200 and include the extended error (Message) to show the properties that were not updated.
I know this part of the specification is not written very clearly - and we're working to correct that...
Jeff
|
|
|
Post by ratagupt on Feb 23, 2019 2:22:56 GMT
Thx a lot
|
|
|
Post by puranik on Feb 25, 2019 18:08:46 GMT
You've got the right section of the specification quoted there. You would respond with HTTP 200 and include the extended error (Message) to show the properties that were not updated. I know this part of the specification is not written very clearly - and we're working to correct that... Jeff I can't find anything in there that would be a proper response for "An internal error when updating property"
|
|
|
Post by ratagupt on Feb 26, 2019 7:00:49 GMT
puranik, it would be success message 200 OK, followed by extended error for the property which has not been updated. Ratan
|
|
|
Post by puranik on Feb 26, 2019 10:39:21 GMT
ratagupt : I get that, I am asking what specific MessageId would this extended error message be? I think the spec asks that the message contain (as an argument) the name of the property that failed to get updated. I don't find a relevant message ID to use in redfish.dmtf.org/schemas/v1/Base.1.4.0.json. Or is it defined elsewhere?
|
|
|
Post by jautor on Feb 26, 2019 16:58:13 GMT
ratagupt : I get that, I am asking what specific MessageId would this extended error message be? I think the spec asks that the message contain (as an argument) the name of the property that failed to get updated. I don't find a relevant message ID to use in redfish.dmtf.org/schemas/v1/Base.1.4.0.json. Or is it defined elsewhere? The Base message registry is the correct place to look. There are a number of messages that would be relevant for a property that can't be updated (PropertyValueNotInList, PropertyNotWritable, PropertyValueTypeError, etc.). But you're correct, there isn't a message currently defined for a property-related "Internal service error". There is "InternalError" but that has no parameters to indicate a specific property. We can certainly (and would encourage!) add more messages to the registry. I can see a need for a "Property wasn't updated because of an internal error" general message to tie to a specific property fault - are there other, more specific, PATCH faults that aren't covered by the "Property*" messages that we should consider? I'll open an issue to create a general message for this case, though - it's certainly better for this case to have the specific property mentioned in the message". Jeff
|
|