Skip to content

Commit

Permalink
Correctly handle invalid origin response
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed May 22, 2012
1 parent 3315b52 commit f71cc8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sentry/web/api.py
Expand Up @@ -81,7 +81,7 @@ def store(request, project_id=None):
if 'HTTP_ORIGIN' in request.META:
origin = request.META.get('HTTP_ORIGIN', '')
if not is_valid_origin(origin, project):
raise APIError('Invalid origin')
return HttpResponse('Invalid origin', status_code=400)
else:
origin = None

Expand Down Expand Up @@ -139,7 +139,7 @@ def store(request, project_id=None):

insert_data_to_database(data)
except APIError, error:
logger.error('Client %r raised API error: %s' % (client, error), exc_info=True)
logger.error('Client %r raised API error: %s' % (client, error))
response = HttpResponse(unicode(error.msg), status=error.http_status)
else:
if request.method == 'POST':
Expand Down

0 comments on commit f71cc8f

Please sign in to comment.