Should RF return HTTP 200 or 5xx http error code when one of the properties is erroring out(backend error) for an URI. And if we decide to return 200 then what should be the value for failing property in RF response, we know that RF schema supports null value for some of the property which could indicate the error on the property. Would like to understand the behaviour generally (even for non nullable property, optional properties as well) wrt property value in RF response and the HTTP response code?
Last Edit: Sept 11, 2023 11:48:32 GMT by aishwaryj
It really depends on how critical that property is going to be for the user in that particular resource. If you have other relevant data to give back to the client that is readily available, a 200 OK would be good in this case. You would show the property as null, and, if possible and helpful in your situation, include the @message.ExtendedInfo annotation to show why the property is unavailable.
However, for properties that are not nullable, you would need to resort to a 500 response. I can certainly see cases where properties are incorrectly defined as not nullable, so if you have a situation where you want to show a property as unavailable, but cannot do so due to it being marked not nullable, please let us know about the specific property and we can evaluate it further.