Raise a proper deactivation exception on bad credentials

This commit is contained in:
Joseph Schorr 2015-06-19 13:05:42 -04:00
parent 8132190fc8
commit ec22bc0662

View file

@ -637,6 +637,9 @@ class GithubBuildTrigger(BuildTriggerHandler):
except UnknownObjectException: except UnknownObjectException:
msg = 'Unable to find GitHub repository for source: %s' % config['build_source'] msg = 'Unable to find GitHub repository for source: %s' % config['build_source']
raise TriggerDeactivationException(msg) raise TriggerDeactivationException(msg)
except GitHubBadCredentialsException:
msg = 'Unable to access repository to disable trigger'
raise TriggerDeactivationException(msg)
# If the trigger uses a deploy key, remove it. # If the trigger uses a deploy key, remove it.
try: try: