From b4dda6b6228cfb78b44d14b9903d2865b015c8ff Mon Sep 17 00:00:00 2001 From: Kory Draughn Date: Sun, 21 Apr 2024 13:15:18 -0400 Subject: [PATCH] [82] Do not print stacktrace when fetching status for unmonitored collection. --- src/handler.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/handler.cpp b/src/handler.cpp index a9b13c2..5b5044f 100644 --- a/src/handler.cpp +++ b/src/handler.cpp @@ -481,8 +481,11 @@ namespace irods::handler const auto& path = *boost::any_cast(*args_iter); if (!is_monitored_collection(conn, attrs, path)) { - THROW(SYS_INVALID_INPUT_PARAM, - fmt::format("Logical Quotas Policy: [{}] is not a monitored collection.", path)); + auto msg = fmt::format("Logical Quotas Policy: [{}] is not a monitored collection.", path); + log::rule_engine::error(msg); + constexpr auto ec = SYS_INVALID_INPUT_PARAM; + addRErrorMsg(&get_rei(_effect_handler).rsComm->rError, ec, msg.c_str()); + return ERROR(ec, std::move(msg)); } auto quota_status = nlohmann::json::object(); // Holds the current quota values.