Searched hist:"3590 bd1dee5a0e56d4d282f0a1e3cf2c8804dfa1" (Results 1 – 4 of 4) sorted by relevance
/openbmc/bmcweb/redfish-core/include/ |
H A D | error_messages.hpp | diff 3590bd1dee5a0e56d4d282f0a1e3cf2c8804dfa1 Fri Aug 12 13:05:09 CDT 2022 Nan Zhou <nanzhoumails@gmail.com> query: propogate errors for expand
The existing code doesn't propogate errors of subqueries correctly. This commit corrects the behavior, so that the final response gets all error message of subqueries and the "highest priority" HTTP code.
DMTF doesn't specify how expand queries handle error codes, since using subqueries is an implementation choice that we made in this project.
What we did here follows existing behavior of this project, and follows the error message section of the Redfish spec; [1] https://redfish.dmtf.org/schemas/DSP0266_1.15.1.html#error-responses
As for now, this commit uses the worst HTTP code among all the error code. See query_param.hpp, function |propogateErrorCode| for detailed order of the errror codes.
Tested: 1. this is difficult to test, but I hijacked the code so it returns errors in TaskServices, then I verified that "/redfish/v1?$expand=." correctly returns 500 and the gets the error message set. 2. unit test so that when there are multiple errors, the final response gets a generate error message.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I0c1ebdd9015f389801db9150d687027485f1203c
|
/openbmc/bmcweb/http/ |
H A D | http_response.hpp | diff 3590bd1dee5a0e56d4d282f0a1e3cf2c8804dfa1 Fri Aug 12 13:05:09 CDT 2022 Nan Zhou <nanzhoumails@gmail.com> query: propogate errors for expand
The existing code doesn't propogate errors of subqueries correctly. This commit corrects the behavior, so that the final response gets all error message of subqueries and the "highest priority" HTTP code.
DMTF doesn't specify how expand queries handle error codes, since using subqueries is an implementation choice that we made in this project.
What we did here follows existing behavior of this project, and follows the error message section of the Redfish spec; [1] https://redfish.dmtf.org/schemas/DSP0266_1.15.1.html#error-responses
As for now, this commit uses the worst HTTP code among all the error code. See query_param.hpp, function |propogateErrorCode| for detailed order of the errror codes.
Tested: 1. this is difficult to test, but I hijacked the code so it returns errors in TaskServices, then I verified that "/redfish/v1?$expand=." correctly returns 500 and the gets the error message set. 2. unit test so that when there are multiple errors, the final response gets a generate error message.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I0c1ebdd9015f389801db9150d687027485f1203c
|
/openbmc/bmcweb/redfish-core/include/utils/ |
H A D | query_param.hpp | diff 3590bd1dee5a0e56d4d282f0a1e3cf2c8804dfa1 Fri Aug 12 13:05:09 CDT 2022 Nan Zhou <nanzhoumails@gmail.com> query: propogate errors for expand
The existing code doesn't propogate errors of subqueries correctly. This commit corrects the behavior, so that the final response gets all error message of subqueries and the "highest priority" HTTP code.
DMTF doesn't specify how expand queries handle error codes, since using subqueries is an implementation choice that we made in this project.
What we did here follows existing behavior of this project, and follows the error message section of the Redfish spec; [1] https://redfish.dmtf.org/schemas/DSP0266_1.15.1.html#error-responses
As for now, this commit uses the worst HTTP code among all the error code. See query_param.hpp, function |propogateErrorCode| for detailed order of the errror codes.
Tested: 1. this is difficult to test, but I hijacked the code so it returns errors in TaskServices, then I verified that "/redfish/v1?$expand=." correctly returns 500 and the gets the error message set. 2. unit test so that when there are multiple errors, the final response gets a generate error message.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I0c1ebdd9015f389801db9150d687027485f1203c
|
/openbmc/bmcweb/redfish-core/src/ |
H A D | error_messages.cpp | diff 3590bd1dee5a0e56d4d282f0a1e3cf2c8804dfa1 Fri Aug 12 13:05:09 CDT 2022 Nan Zhou <nanzhoumails@gmail.com> query: propogate errors for expand
The existing code doesn't propogate errors of subqueries correctly. This commit corrects the behavior, so that the final response gets all error message of subqueries and the "highest priority" HTTP code.
DMTF doesn't specify how expand queries handle error codes, since using subqueries is an implementation choice that we made in this project.
What we did here follows existing behavior of this project, and follows the error message section of the Redfish spec; [1] https://redfish.dmtf.org/schemas/DSP0266_1.15.1.html#error-responses
As for now, this commit uses the worst HTTP code among all the error code. See query_param.hpp, function |propogateErrorCode| for detailed order of the errror codes.
Tested: 1. this is difficult to test, but I hijacked the code so it returns errors in TaskServices, then I verified that "/redfish/v1?$expand=." correctly returns 500 and the gets the error message set. 2. unit test so that when there are multiple errors, the final response gets a generate error message.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I0c1ebdd9015f389801db9150d687027485f1203c
|