fixes
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
Blockstorage/repertory/pipeline/head There was a failure building this commit

This commit is contained in:
2025-09-16 07:02:33 -05:00
parent cbfa64556a
commit 06485e0307
4 changed files with 14 additions and 0 deletions

View File

@@ -50,6 +50,9 @@ void raise_error(std::string_view function, std::int64_t err,
void raise_error(std::string_view function, const std::exception &exception,
std::string_view file_path, std::string_view msg);
void raise_api_path_error(std::string_view function, std::string_view api_path,
std::string_view msg);
void raise_api_path_error(std::string_view function, std::string_view api_path,
api_error err, std::string_view msg);

View File

@@ -344,6 +344,8 @@ auto rdb_meta_db::remove_api_path(const std::string &api_path,
auto rdb_meta_db::remove_item_meta(const std::string &api_path,
const std::string &key) -> api_error {
REPERTORY_USES_FUNCTION_NAME();
if (key == META_DIRECTORY || key == META_PINNED || key == META_SIZE ||
key == META_SOURCE) {
utils::error::raise_api_path_error(

View File

@@ -305,6 +305,8 @@ void sqlite_meta_db::remove_api_path(const std::string &api_path) {
auto sqlite_meta_db::remove_item_meta(const std::string &api_path,
const std::string &key) -> api_error {
REPERTORY_USES_FUNCTION_NAME();
if (key == META_DIRECTORY || key == META_PINNED || key == META_SIZE ||
key == META_SOURCE) {
utils::error::raise_api_path_error(

View File

@@ -146,6 +146,13 @@ void raise_error(std::string_view function, const std::exception &exception,
(exception.what() == nullptr ? "unknown error" : exception.what()));
}
void raise_api_path_error(std::string_view function, std::string_view api_path,
std::string_view msg) {
event_system::instance().raise<repertory_exception>(
function, static_cast<std::string>(msg) + "|ap|" +
static_cast<std::string>(api_path));
}
void raise_api_path_error(std::string_view function, std::string_view api_path,
api_error err, std::string_view msg) {
event_system::instance().raise<repertory_exception>(