Skip to content

search: fix potential err capture when building Zoekt expression

Administrator requested to merge rvt/fix-err-o into main

Created by: rvantonder

Follow up of https://github.com/sourcegraph/sourcegraph/pull/31527/files#r810840028. Let's just make fold side-effect free.

Test plan

This is difficult to test because we assume the code is unreachable. Even the err generated by parseRe is very likely cannot be triggered, because we validate the input earlier during parsing.

Merge request reports

Loading