Skip to content
Snippets Groups Projects
Commit 23023203 authored by bmedx's avatar bmedx
Browse files

Bubble up 404s from the forum service on user retirement

parent f0408978
Branches
Tags
No related merge requests found
......@@ -560,6 +560,12 @@ class RetireUserView(APIView):
cc_user.retire(username)
except UserRetirementStatus.DoesNotExist:
return Response(status=status.HTTP_404_NOT_FOUND)
except comment_client.CommentClientRequestError as exc:
# 404s from client service for users that don't exist there are expected
# we can just pass those up.
if exc.status_code == 404:
return Response(status=status.HTTP_404_NOT_FOUND)
raise
except Exception as exc: # pylint: disable=broad-except
return Response(text_type(exc), status=status.HTTP_500_INTERNAL_SERVER_ERROR)
......
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