|
Post by ratagupt on Jan 18, 2024 13:25:41 GMT
Hi Mike/Jeff, If a GET request is made on a Redfish Resource that supports multiple properties, and an error occurs for a specific property while others provide valid data, the available options include: - Sending a response with an error message specifically for the property where the issue occurred.
or - Opting for a complete failure response, considering that there is no error code designated for cases of partial success.
Ratan
|
|
|
Post by mraineri on Jan 18, 2024 14:10:07 GMT
The second option (failing the entire request) is valid. That would likely be a 500 response in this case.
However, your other option would be to return 200 OK, use null for the property that's failing, and include the @message.ExtendedInfo annotation in the response to show messages as to why the property is not available. You wouldn't use the "error" payload like in a 4XX or 5XX response. This sounds like what you described in your first option, but I just wanted to make this clear. This approach can be preferable in many cases because while a single property isn't available, there could be a lot of other useful information the client may still want to consume.
|
|
|
Post by ratagupt on Jan 30, 2024 15:14:44 GMT
The second option (failing the entire request) is valid. That would likely be a 500 response in this case. However, your other option would be to return 200 OK, use null for the property that's failing, and include the @message.ExtendedInfo annotation in the response to show messages as to why the property is not available. You wouldn't use the "error" payload like in a 4XX or 5XX response. This sounds like what you described in your first option, but I just wanted to make this clear. This approach can be preferable in many cases because while a single property isn't available, there could be a lot of other useful information the client may still want to consume. Thanks Mike
|
|