Handle bad api_key for jira integration properly.

(imported from commit e6063431e81434faa5f32ac8f91a08f86bd46997)
This commit is contained in:
Steve Howell 2013-04-30 18:26:34 -04:00
parent 0d84d0858a
commit 30f825ebfe
1 changed files with 1 additions and 2 deletions

View File

@ -1525,8 +1525,7 @@ def api_jira_webhook(request):
try: try:
user_profile = UserProfile.objects.get(api_key=api_key) user_profile = UserProfile.objects.get(api_key=api_key)
except UserProfile.DoesNotExist: except UserProfile.DoesNotExist:
import logging return json_error("Failed to find user with API key: %s" % (api_key,))
logging.warning("Failed to find user with API key: %s" % api_key)
def get_in(payload, keys, default=''): def get_in(payload, keys, default=''):
try: try: