diff --git a/components/core/src/clp_s/JsonParser.cpp b/components/core/src/clp_s/JsonParser.cpp index 6fb86f7cf..649720d09 100644 --- a/components/core/src/clp_s/JsonParser.cpp +++ b/components/core/src/clp_s/JsonParser.cpp @@ -4,9 +4,11 @@ #include #include +#include #include #include +#include "../clp/NetworkReader.hpp" #include "../clp/ReaderInterface.hpp" #include "archive_constants.hpp" #include "JsonFileIterator.hpp" @@ -542,6 +544,23 @@ bool JsonParser::parse() { path.path ); } + + if (auto network_reader = std::dynamic_pointer_cast(reader); + nullptr != network_reader) + { + if (auto const rc = network_reader->get_curl_ret_code(); + rc.has_value() && CURLcode::CURLE_OK != rc.value()) + { + auto curl_error_message = network_reader->get_curl_error_msg(); + std::string error_msg_str; + if (curl_error_message.has_value()) { + error_msg_str = curl_error_message.value(); + } + SPDLOG_ERROR("Encountered curl error during ingestion - {}", error_msg_str); + } + m_archive_writer->close(); + return false; + } } return true; }