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

Commit

Permalink
Handle empty responses coming back from Jira. This fixes SENTRY-12J
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Apr 13, 2016
1 parent 6c05262 commit 079680c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sentry_jira/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ def get_create_meta_for_project(self, project):
response = self.get_create_meta(project)
metas = response.json

# We saw an empty JSON response come back from the API :(
if not metas:
return None

# XXX(dcramer): document how this is possible, if it even is
if len(metas["projects"]) > 1:
raise JIRAError("More than one project found.")
Expand Down

0 comments on commit 079680c

Please sign in to comment.