Skip to content

Commit 5a3a96d

Browse files
committed
Add logging for redirection/serving
1 parent f2ddf94 commit 5a3a96d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

readthedocs/core/views/serve.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,11 @@ def redirect_project_slug(request, project, subproject): # pylint: disable=unus
120120
# community. This can be removed once the middleware incorporates
121121
# more data or redirects happen outside this application
122122
# See: https://github.com/rtfd/readthedocs.org/pull/5690
123+
log.warning('Serving docs for a single-version subproject instead redirecting')
123124
from readthedocsinc.core.views import serve_docs as corporate_serve_docs # noqa
124125
return corporate_serve_docs(request, project, project.slug, subproject, subproject.slug)
125126
except Exception:
126-
pass
127+
log.exception('Error trying to redirect a single-version subproject')
127128

128129
return HttpResponseRedirect(
129130
resolve(

0 commit comments

Comments
 (0)