diff --git a/app.py b/app.py index cdc7dbd..a1f93e9 100644 --- a/app.py +++ b/app.py @@ -81,6 +81,9 @@ def _attach_url_to_issue(issue_id, url, title=None): if resp.status_code != 200: logger.error('Failed to attach url to issue: %s' % resp.text) return False + if not resp.json().get('data', {}): + logger.error('Failed to attach url to issue: %s' % resp.text) + return False if not resp.json().get('data', {}).get('attachmentLinkURL', {}).get('success'): logger.error('Failed to attach url to issue: %s' % resp.text) return False @@ -180,4 +183,4 @@ def sentry_event(): if __name__ == "__main__": - app.run(host="0.0.0.0", port=5000) + app.run(host="0.0.0.0", port=5050)