diff --git a/gitlab_docker_autodep/deps.py b/gitlab_docker_autodep/deps.py
index 48775f749dc85c8ffc2baba1a0652fa2c9546bfd..72fea3fb81ced77d65c2891dd1d0253b1e6eb313 100644
--- a/gitlab_docker_autodep/deps.py
+++ b/gitlab_docker_autodep/deps.py
@@ -102,11 +102,16 @@ def rebuild_deps(gitlab_url, registry_hostname, gitlab_token,
 
         logging.info('rebuilding %s', project.path_with_namespace)
         if not dry_run:
-            pipeline = rebuild(project, wait)
-            if pipeline.status not in ('success', 'pending'):
-                logging.error('ERROR: build failed for %s (%s)',
-                              project.path_with_namespace, pipeline)
-                return
+            try:
+                pipeline = rebuild(project, wait)
+                if pipeline.status not in ('success', 'pending'):
+                    logging.error('ERROR: build failed for %s (status: %s)',
+                                  project.path_with_namespace, pipeline.status)
+                    continue
+            except gitlab.exceptions.GitlabError as e:
+                logging.error('ERROR: gitlab error: %s: %s',
+                              project.path_with_namespace, str(e))
+                continue
 
         if recurse:
             image_name = '%s/%s' % (