Skip to content

Commit bec8acd

Browse files
committed
Add more exceptions as "expected" in our update_docs celery task
These exceptions won't be logged into Sentry as ERROR but they will be logged as INFO since they are errors from a user's perspective (build failed) but not from an application perspective (our code didn't fail).
1 parent bc37f57 commit bec8acd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

readthedocs/projects/tasks.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ def run(self, version_pk): # pylint: disable=arguments-differ
264264
return False
265265

266266

267+
# Exceptions under ``throws`` argument are considered ERROR from a Build
268+
# perspective but as a WARNING for the application itself. These exception are
269+
# logged as ``INFO`` and they are not sent to Sentry.
267270
@app.task(
268271
bind=True,
269272
max_retries=5,
@@ -273,7 +276,11 @@ def run(self, version_pk): # pylint: disable=arguments-differ
273276
ProjectBuildsSkippedError,
274277
YAMLParseError,
275278
BuildTimeoutError,
279+
BuildEnvironmentWarning,
280+
RepositoryError,
281+
ProjectConfigurationError,
276282
ProjectBuildsSkippedError,
283+
MkDocsYAMLParseError,
277284
),
278285
)
279286
def update_docs_task(self, project_id, *args, **kwargs):
@@ -320,7 +327,7 @@ def __init__(
320327
self.version = version
321328
self.project = {}
322329
if project is not None:
323-
self.project = project
330+
s self.project = project
324331
if config is not None:
325332
self.config = config
326333
self.task = task

0 commit comments

Comments
 (0)