From ec22bc0662a256ce82625bd797b46df4c1202fd3 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 19 Jun 2015 13:05:42 -0400 Subject: [PATCH] Raise a proper deactivation exception on bad credentials --- endpoints/trigger.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/endpoints/trigger.py b/endpoints/trigger.py index f281b83b7..dd8d30eec 100644 --- a/endpoints/trigger.py +++ b/endpoints/trigger.py @@ -637,6 +637,9 @@ class GithubBuildTrigger(BuildTriggerHandler): except UnknownObjectException: msg = 'Unable to find GitHub repository for source: %s' % config['build_source'] 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. try: