Raise a proper deactivation exception on bad credentials
This commit is contained in:
parent
8132190fc8
commit
ec22bc0662
1 changed files with 3 additions and 0 deletions
|
@ -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:
|
||||||
|
|
Reference in a new issue