Skip to content

Commit ad2d320

Browse files
committed
Handle simple responses from process
1 parent 981a99d commit ad2d320

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/sentry/web/api.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,12 @@ class StoreView(APIView):
251251
@never_cache
252252
def post(self, request, project, auth, **kwargs):
253253
data = request.raw_post_data
254-
event_id = self.process(request, project, auth, data, **kwargs)
254+
response_or_event_id = self.process(request, project, auth, data, **kwargs)
255+
if isinstance(response_or_event_id, HttpResponse):
256+
return response_or_event_id
255257
return HttpResponse(json.dumps({
256-
'id': event_id,
257-
}), 'application/json')
258+
'id': response_or_event_id,
259+
}), content_type='application/json')
258260

259261
@never_cache
260262
def get(self, request, project, auth, **kwargs):

0 commit comments

Comments
 (0)