mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
RedfishPkg/RedfishHttpDxe: report failure via status code
Manageability status code is introduced to edk2. Enable the ability to report Redfish communication failure via status code. This gives the chance for BMC to capture Redfish error. Signed-off-by: Nickle Wang <nicklew@nvidia.com>
This commit is contained in:
parent
3ba6f7d966
commit
54c1460dd0
1 changed files with 9 additions and 11 deletions
|
|
@ -2,7 +2,7 @@
|
|||
RedfishHttpDxe produces EdkIIRedfishHttpProtocol
|
||||
for EDK2 Redfish Feature driver to do HTTP operations.
|
||||
|
||||
Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
Copyright (c) 2023-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
|
|
@ -255,18 +255,16 @@ ReportHttpError (
|
|||
//
|
||||
AsciiSPrint (ErrorMsg, sizeof (ErrorMsg), REDFISH_HTTP_ERROR_REPORT, HttpMethodToString (Method), (HttpStatusCode == NULL ? HTTP_STATUS_UNSUPPORTED_STATUS : *HttpStatusCode), Uri);
|
||||
DEBUG ((DEBUG_ERROR, "%a\n", ErrorMsg));
|
||||
|
||||
//
|
||||
// TODO:
|
||||
// Below PI status code is approved by PIWG and wait for specification published.
|
||||
// We will uncomment below report status code after PI status code get published.
|
||||
// REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4483
|
||||
// Report this failure via status code and BMC has chance to capture the error.
|
||||
//
|
||||
// REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
|
||||
// EFI_ERROR_CODE | EFI_ERROR_MAJOR,
|
||||
// EFI_COMPUTING_UNIT_MANAGEABILITY | EFI_MANAGEABILITY_EC_REDFISH_COMMUNICATION_ERROR,
|
||||
// ErrorMsg,
|
||||
// AsciiStrSize (ErrorMsg)
|
||||
// );
|
||||
REPORT_STATUS_CODE_WITH_EXTENDED_DATA (
|
||||
EFI_ERROR_CODE | EFI_ERROR_MAJOR,
|
||||
EFI_COMPUTING_UNIT_MANAGEABILITY | EFI_MANAGEABILITY_EC_REDFISH_COMMUNICATION_ERROR,
|
||||
ErrorMsg,
|
||||
AsciiStrSize (ErrorMsg)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue