sag
Minnow
Posts: 18
|
Post by sag on Mar 26, 2024 14:25:07 GMT
I'm looking for a way to add an additional context/explanation when using an error from the Base Registry with a single ExtendedInfo. The contents for "Message" and "Resolution" properties are defined in the registry. Also, the Message schema doesn't allow for OEM extensions.
Any suggestions? Perhaps there is some annotation that could be used in this case?
My use case: In our case, one of the actions should be supported conditionally, based on resource state. After looking through the Base Registry, I decided that ActionNotSupported is the error that fits best in this case. However, I want to provide the client with an additional message explaining why that action is not supported at that moment.
|
|
|
Post by mraineri on Mar 26, 2024 16:44:54 GMT
Message objects do allow for OEM extensions. There's the typical "Oem" object defined at the same level as MessageId and Message here: github.com/DMTF/Redfish-Publications/blob/main/csdl/Message_v1.xml#L88You are also allowed to modify "Resolution" in your usage of messages. There's no requirement to take the resolution from the message registry as-is since DMTF can't give implementation-specific information for every possible situation. We have this statement in the Resolution property that describes this: > Services can replace the resolution defined in the message registry with a more specific resolution in message payloads. "ActionNotSupported" makes sense to me for what you're describing; you can certainly provide a resolution like "Enable feature X on resource Y." in your message object to convey that situation back to the user.
|
|
sag
Minnow
Posts: 18
|
Post by sag on Mar 27, 2024 9:01:54 GMT
I don't know how I missed the "Oem" key. And modifying "Resolution" is a very nice lead. Thanks!
|
|