feat(transport): bugfix in error handling