Skip to content

Commit a6f57a3

Browse files
authored
Sentry and Celery: do not log RepositoryError in Sentry (#8928)
This usually happens because there is a problem with the user's repository (e.g. the repository is private and requires a password) which is something we cannot solve from our side. So, we ignore this exceptions from being logged in Sentry.
1 parent 17fbc86 commit a6f57a3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

readthedocs/projects/tasks/builds.py

+3
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ class SyncRepositoryTask(SyncRepositoryMixin, Task):
117117
name = __name__ + '.sync_repository_task'
118118
max_retries = 5
119119
default_retry_delay = 7 * 60
120+
throws = (
121+
RepositoryError,
122+
)
120123

121124
def before_start(self, task_id, args, kwargs):
122125
log.info('Running task.', name=self.name)

0 commit comments

Comments
 (0)