Skip to content

Commit 9aa31dc

Browse files
committed
fix(pine-cpp): guard set_common type check — cross-engine error message parity (review)
1 parent f2a544d commit 9aa31dc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pine-cpp/operators/recall/recall_static.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ class RecallStaticOp : public Operator, public AdditiveWritesRowSet {
2020
const auto& params = cfg.params.as_object();
2121
auto it = params.find("set_common");
2222
if (it != params.end() && !it->second.is_null()) {
23+
if (!it->second.is_object()) {
24+
throw RegistryError(op_name_,
25+
"recall_static: 'set_common' must be a JSON object, got " +
26+
pine::operators::json_type_name(it->second));
27+
}
2328
for (const auto& [key, value] : it->second.as_object()) {
2429
set_common_[key] = value;
2530
}

0 commit comments

Comments
 (0)