Skip to content
Snippets Groups Projects
Commit 447f8739 authored by hasnain.naveed's avatar hasnain.naveed Committed by zia.fazal@arbisoft.com
Browse files

ENT-2524 | Added the request META in exception traceback.

Only add `PATH_INFO` to log

removed METH from label too
parent 8f5a166a
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ import logging
from functools import wraps
import traceback
from crum import get_current_request
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
......@@ -257,10 +258,11 @@ 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]. Caller: %s',
u'Failed to get enterprise-learner for user [%s] with client user [%s]. Caller: %s, Request PATH: %s',
user.username,
self.user.username,
"".join(traceback.format_stack())
"".join(traceback.format_stack()),
get_current_request().META['PATH_INFO'],
)
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