distribution: errors: do not access the errors slice if it's empty Upstream-commit: f2b1b44de81ec9c7fd404fb3e0b4eefd83939a94 Component: engine