Skip to content

Commit 84a60e4

Browse files
committed
fix: surface invalid bigSegmentsStatus as a JSON parse error
1 parent c43f046 commit 84a60e4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

libs/internal/src/serialization/json_evaluation_reason.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,10 @@ tl::expected<EvaluationReason, JsonError> tag_invoke(
227227
auto parsed = boost::json::value_to<tl::expected<
228228
enum EvaluationReason::BigSegmentsStatus, JsonError>>(
229229
big_segments_status_iter->value());
230-
if (parsed) {
231-
big_segments_status = *parsed;
230+
if (!parsed) {
231+
return tl::make_unexpected(parsed.error());
232232
}
233+
big_segments_status = parsed.value();
233234
}
234235

235236
return EvaluationReason{*kind,

0 commit comments

Comments
 (0)