diff --git a/redfish-core/lib/rde.hpp b/redfish-core/lib/rde.hpp index 2db9c69173..c8e467a93a 100644 --- a/redfish-core/lib/rde.hpp +++ b/redfish-core/lib/rde.hpp @@ -171,7 +171,14 @@ inline nlohmann::json handleDeferredBindings(const std::string& bejJsonInput, bejJson = std::regex_replace(bejJson, std::regex(R"(%I(\d+))"), "$1"); BMCWEB_LOG_DEBUG("RDE: BEJ JSON String Output: {}", bejJson); - return nlohmann::json::parse(bejJson); + nlohmann::json jsonPayload; + if(!bejJson.empty()) + { + jsonPayload = nlohmann::json::parse(bejJson); + return jsonPayload; + } + else + return jsonPayload; } /** * @brief Process the TaskUpdated signal for an RDE Operation Task. @@ -1232,12 +1239,13 @@ inline void requestRoutesRDEService(crow::App& app) const std::shared_ptr& asyncResp, const std::string& systemId, const std::string& deviceId, const std::string& vendorPath) { - std::string baseUri = "/redfish/v1/Systems/" + systemId + - "/NetworkAdapters/" + deviceId; + std::string baseUri = "/redfish/v1/Systems/" + systemId + + "/NetworkAdapters/" + deviceId; - handleRDEServicePath(app, req, asyncResp, systemId, deviceId, - vendorPath, redfish::networkSchemaName, baseUri); - }); + handleRDEServicePath(app, req, asyncResp, systemId, deviceId, + vendorPath, redfish::networkSchemaName, + baseUri); + }); BMCWEB_ROUTE(app, "/redfish/v1/Systems//NetworkAdapters/") .privileges(redfish::privileges::getProcessor) @@ -1245,11 +1253,11 @@ inline void requestRoutesRDEService(crow::App& app) [&app](const crow::Request& req, const std::shared_ptr& asyncResp, const std::string& systemId, const std::string& deviceId) { - std::string baseUri = "/redfish/v1/Systems/" + systemId + - "/NetworkAdapters/" + deviceId; - handleRDEServiceRoot(app, req, asyncResp, systemId, deviceId, - redfish::networkSchemaName, baseUri); - }); + std::string baseUri = "/redfish/v1/Systems/" + systemId + + "/NetworkAdapters/" + deviceId; + handleRDEServiceRoot(app, req, asyncResp, systemId, deviceId, + redfish::networkSchemaName, baseUri); + }); } } // namespace redfish