Browse Source

Quickly fail when no JSON data is found

David Cramer 8 years ago
parent
commit
464ea1abe9
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/sentry/web/api.py

+ 3 - 0
src/sentry/web/api.py

@@ -291,6 +291,9 @@ class StoreView(APIView):
             sender=type(self),
         )
 
+        if not data:
+            raise APIError('No JSON data was found')
+
         if not is_valid_ip(remote_addr, project):
             app.tsdb.incr_multi([
                 (app.tsdb.models.project_total_received, project.id),