Browse Source

use different status code for too large

Jess MacQueen 8 years ago
parent
commit
84b04af3ba
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/sentry/api/endpoints/useravatar.py

+ 1 - 1
src/sentry/api/endpoints/useravatar.py

@@ -42,7 +42,7 @@ class UserAvatarEndpoint(UserEndpoint):
         if photo_string:
             photo_string = photo_string.decode('base64')
             if len(photo_string) > settings.SENTRY_MAX_AVATAR_SIZE:
-                return Response(status=status.HTTP_400_BAD_REQUEST)
+                return Response(status=status.HTTP_413_REQUEST_ENTITY_TOO_LARGE)
             with Image.open(StringIO(photo_string)) as img:
                 width, height = img.size
                 if not self.is_valid_size(width, height):