Skip to content
Snippets Groups Projects
Unverified Commit 75031d76 authored by Zia Fazal's avatar Zia Fazal Committed by GitHub
Browse files

Merge pull request #22297 from edx/ziafazal/ENT-1849

ENT-1849: Added caller info to the exception message
parents 04255022 5b6e0514
No related branches found
No related tags found
No related merge requests found
......@@ -40,8 +40,8 @@ class ContactUsView(View):
if request.user.is_authenticated:
context['course_id'] = request.session.get('course_id', '')
context['user_enrollments'] = CourseEnrollment.enrollments_for_user_with_overviews_preload(request.user)
enterprise_learner_data = enterprise_api.get_enterprise_learner_data(user=request.user)
if enterprise_learner_data:
enterprise_customer = enterprise_api.enterprise_customer_for_request(request)
if enterprise_customer:
tags.append('enterprise_learner')
context['tags'] = tags
......
......@@ -5,6 +5,7 @@ from __future__ import absolute_import
import logging
from functools import wraps
import traceback
from django.conf import settings
from django.contrib.auth.models import User
......@@ -256,9 +257,10 @@ class EnterpriseApiClient(object):
response = endpoint().get(**querystring)
except (HttpClientError, HttpServerError):
LOGGER.exception(
u'Failed to get enterprise-learner for user [%s] with client user [%s]',
u'Failed to get enterprise-learner for user [%s] with client user [%s]. Caller: %s',
user.username,
self.user.username
self.user.username,
"".join(traceback.format_stack())
)
return None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment