Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Code] Error handling support and return error message in Messages object #16

Open
nicklela opened this issue May 30, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@nicklela
Copy link
Contributor

Current feature driver has no ability to return error back to user. Redfish allow application to put error message in Message object. Below is an example

Image

Ref:
Redfish spec. 1.15.1 chapter 8.6 Error responses:
HTTP status codes often do not provide enough information to enable deterministic error semantics. .... Additionally, the service may provide Redfish standardized errors, OEMdefined errors, or both, depending on the implementation's ability to convey the most useful information about the underlying error.

Image

@nicklela nicklela self-assigned this May 30, 2023
@nicklela nicklela added the enhancement New feature or request label May 30, 2023
@changab
Copy link
Member

changab commented May 30, 2023

Current feature driver has no ability to return error back to user

ok, I forget what was the conclusion. Return the message to BIOS if something is wrong when the Redfish operation? Such as PATCH a BIOS attribute with improper format?

@nicklela
Copy link
Contributor Author

Current feature driver has no ability to return error back to use

ok, I forget what was the conclusion. Return the message to BIOS if something is wrong when the Redfish operation? Such as PATCH a BIOS attribute with improper format?

Yes, format is one thing BIOS can capture. Others like the typo or invalid value passing from user. One other error that is important to user is the dependency violation. So, like you said, BIOS needs to return error back to user while user makes changes to pending settings (/redfish/v1/..../Bios/Settings)

Depending on the BMC implementation, some validation can be done by BMC. For example, BMC can read BIOS attribute registry and learn the definition of BIOS attributes. So BMC can help to check typo, formating and value boundary. One BMC can do this, BMC can return error immediately to user with HTTP error status code. User does not need additional reset cycle to read error message. But BMC has to agree with this implementation. For OpenBMC, it means OpenBMC has to manage BIOS resource with internal data structure. This should be possible because OpenBMC has BIOS Table data structure (Ref: https://github.com/openbmc/bios-settings-mgr/blob/36cd3238d75c5f3479a944a2f1a9a3abc316120a/src/manager.cpp#L99)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants