da4b6275ba
The errors.Wrap and errors.Wrapf functions gracefully handle nil-errors. This allows them to be used unconditionally regardless if an error was produced. While this can be convenient, it can also be err-prone, as replacing these with stdlib errors means they unconditionally produce an error. This patch replaces code uses of errors.Wrap to be gated by a check for nil-errors to future-proof our code. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>