Skip to content
This repository was archived by the owner on Aug 28, 2023. It is now read-only.

Commit 205311e

Browse files
committed
Don't assume there's a Content-Type header
Fixes https://app.getsentry.com/sentry/sentry/group/16258585/
1 parent 3532d24 commit 205311e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sentry_github/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def create_issue(self, request, group, form_data, **kwargs):
7676
except Exception, e:
7777
if isinstance(e, urllib2.HTTPError):
7878
msg = e.read()
79-
if 'application/json' in e.headers['Content-Type']:
79+
if 'application/json' in e.headers.get('Content-Type', ''):
8080
try:
8181
msg = simplejson.loads(msg)
8282
msg = msg['message']

0 commit comments

Comments
 (0)