Skip to content

Fix incorrect use of errors.Append masking errors

Warren Gifford requested to merge devx/fix-incorrect-errors-append into main

Created by: jhchabran

Follow-up to https://github.com/sourcegraph/sourcegraph/pull/34563


It's possible to pass only a single argument to errors.Append which has the effect of not appending the errors and only returning the last one.

It's really easy to miss because the API makes it look like you're calling an Append method on a receiver, which would imply it has a side-effect. But it's not a receiver it's a package, so it just silently discards errors.

Test plan

Minor change, green build.

Merge request reports

Loading