MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / IsUnknownFunctionResultError

Function IsUnknownFunctionResultError

eval/eval/function_step.cc:130–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130bool IsUnknownFunctionResultError(const Value& result) {
131 if (!result->Is<cel::ErrorValue>()) {
132 return false;
133 }
134
135 const auto& status = result.GetError().NativeValue();
136
137 if (status.code() != absl::StatusCode::kUnavailable) {
138 return false;
139 }
140 auto payload = status.GetPayload(
141 cel::runtime_internal::kPayloadUrlUnknownFunctionResult);
142 return payload.has_value() && payload.value() == "true";
143}
144
145// Simple wrapper around a function resolution result. A function call should
146// resolve to a single function implementation and a descriptor or none.

Callers 1

InvokeFunction · 0.85

Calls 5

codeMethod · 0.80
NativeValueMethod · 0.45
GetErrorMethod · 0.45
has_valueMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected