Commit 09501a62 by Sarina Canelake

Handle exception with a 404

parent d5c5fb34
...@@ -369,7 +369,7 @@ def user_profile(request, course_id, user_id): ...@@ -369,7 +369,7 @@ def user_profile(request, course_id, user_id):
} }
return render_to_response('discussion/user_profile.html', context) return render_to_response('discussion/user_profile.html', context)
except (cc.utils.CommentClientError, cc.utils.CommentClientUnknownError) as err: except (cc.utils.CommentClientError, cc.utils.CommentClientUnknownError, User.DoesNotExist) as err:
raise Http404 raise Http404
...@@ -412,5 +412,5 @@ def followed_threads(request, course_id, user_id): ...@@ -412,5 +412,5 @@ def followed_threads(request, course_id, user_id):
} }
return render_to_response('discussion/user_profile.html', context) return render_to_response('discussion/user_profile.html', context)
except (cc.utils.CommentClientError, cc.utils.CommentClientUnknownError): except (cc.utils.CommentClientError, cc.utils.CommentClientUnknownError, User.DoesNotExist) as err:
raise Http404 raise Http404
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment