Post by AMI_archerwen on Jul 14, 2022 6:48:51 GMT
Hi,
I have a question about the "Single Error Message".
Is the "code" and "message" need be same as "MessageId" and "Message"?
Here is the origin example.
{
"error": {
"@message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_8.Message",
"Message": "While attempting to establish a connection to /redfish/v1/SessionService, the service was denied access.",
"MessageArgs": [
"/redfish/v1/SessionService"
],
"MessageId": "Security.1.0.AccessDenied",
"Resolution": "Attempt to ensure that the URI is correct and that the service has the appropriate credentials.",
"Severity": "Critical"
}
],
"code": "Security.1.0.AccessDenied",
"message": "While attempting to establish a connection to /redfish/v1/SessionService, the service was denied access."
}
}
Or we can display like below?
{
"error": {
"@message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_8.Message",
"Message": "While attempting to establish a connection to /redfish/v1/SessionService, the service was denied access.",
"MessageArgs": [
"/redfish/v1/SessionService"
],
"MessageId": "Security.1.0.AccessDenied",
"Resolution": "Attempt to ensure that the URI is correct and that the service has the appropriate credentials.",
"Severity": "Critical"
}
],
"code": "Base.1.12.GeneralError",
"message": "A general error has occurred. See Resolution for information on how to resolve the error, or @message.ExtendedInfo if Resolution is not provided."
}
}
I have a question about the "Single Error Message".
Is the "code" and "message" need be same as "MessageId" and "Message"?
Here is the origin example.
{
"error": {
"@message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_8.Message",
"Message": "While attempting to establish a connection to /redfish/v1/SessionService, the service was denied access.",
"MessageArgs": [
"/redfish/v1/SessionService"
],
"MessageId": "Security.1.0.AccessDenied",
"Resolution": "Attempt to ensure that the URI is correct and that the service has the appropriate credentials.",
"Severity": "Critical"
}
],
"code": "Security.1.0.AccessDenied",
"message": "While attempting to establish a connection to /redfish/v1/SessionService, the service was denied access."
}
}
Or we can display like below?
{
"error": {
"@message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_8.Message",
"Message": "While attempting to establish a connection to /redfish/v1/SessionService, the service was denied access.",
"MessageArgs": [
"/redfish/v1/SessionService"
],
"MessageId": "Security.1.0.AccessDenied",
"Resolution": "Attempt to ensure that the URI is correct and that the service has the appropriate credentials.",
"Severity": "Critical"
}
],
"code": "Base.1.12.GeneralError",
"message": "A general error has occurred. See Resolution for information on how to resolve the error, or @message.ExtendedInfo if Resolution is not provided."
}
}