Add test for swarm error handling Upstream-commit: f96180a0a88c541b1a413a9371cb5695c70b7323 Component: engine