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

Commit

Permalink
Improve error messages on failures
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed May 27, 2016
1 parent 1e0618e commit 07d0f11
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sentry_jira/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,13 @@ def clean(self):
" logins." % e.status_code)
else:
logging.exception(e)
raise ValidationError("Unable to connect to JIRA: Bad Response")
raise ValidationError("Unable to connect to JIRA: the remote "
"server returned an unhandled %s status "
" code" % e.status_code)
if not sut_response.json:
raise ValidationError("Unable to connect to JIRA: Bad Response")
raise ValidationError("Unable to connect to JIRA: "
"the response did not contain valid JSON, did "
"you enter the correct instance URL?")

return cd

Expand Down

0 comments on commit 07d0f11

Please sign in to comment.