Skip to content

Commit 4be00f6

Browse files
committed
fix(api): use make_error_result helper for correct error_info construction
The common_system error_info struct does not have a 'context' member accessible via .context. Use the existing make_error_result helper which constructs error_info correctly with positional arguments.
1 parent 5e4bb7e commit 4be00f6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

database/integrated/unified_database_system.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -899,11 +899,11 @@ kcenon::common::Result<std::unique_ptr<unified_database_system>> unified_databas
899899
if (!connection_string_.empty()) {
900900
auto result = system->connect(config_.database.type, connection_string_);
901901
if (!result.is_ok()) {
902-
return kcenon::common::error_info{
903-
result.error().code,
902+
return make_error_result<std::unique_ptr<unified_database_system>>(
904903
"Failed to connect: " + result.error().message,
905-
result.error().context
906-
};
904+
result.error().code,
905+
"unified_database_system"
906+
);
907907
}
908908
}
909909

0 commit comments

Comments
 (0)