Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
8e51c69a
Commit
8e51c69a
authored
Oct 10, 2017
by
Matt Drayer
Committed by
Uman Shahzad
Oct 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log additional context for SuccessFactors errors.
parent
2605bf99
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
common/djangoapps/third_party_auth/saml.py
+12
-8
common/djangoapps/third_party_auth/tests/specs/test_testshib.py
+3
-2
No files found.
common/djangoapps/third_party_auth/saml.py
View file @
8e51c69a
...
...
@@ -307,15 +307,19 @@ class SapSuccessFactorsIdentityProvider(EdXSAMLIdentityProvider):
response
=
response
.
json
()
except
requests
.
RequestException
as
err
:
# If there was an HTTP level error, log the error and return the details from the SAML assertion.
log
.
warning
(
'Unable to retrieve user details with username
%
s from SAPSuccessFactors for company ID
%
s '
'with url "
%
s" and error message:
%
s'
,
username
,
self
.
odata_company_id
,
odata_api_url
,
err
.
message
,
exc_info
=
True
,
sys_msg
=
err
.
response
.
json
()
if
err
.
response
else
"Not available"
log_msg_template
=
(
'Unable to retrieve user details with username {username} from SAPSuccessFactors for company '
+
'ID {company} with url "{url}". Error message: {err_msg}. System message: {sys_msg}.'
)
log_msg
=
log_msg_template
.
format
(
username
=
username
,
company
=
self
.
odata_company_id
,
url
=
odata_api_url
,
err_msg
=
err
.
message
,
sys_msg
=
sys_msg
)
log
.
warning
(
log_msg
,
exc_info
=
True
)
return
details
return
self
.
get_registration_fields
(
response
)
...
...
common/djangoapps/third_party_auth/tests/specs/test_testshib.py
View file @
8e51c69a
...
...
@@ -517,8 +517,9 @@ class SuccessFactorsIntegrationTest(SamlIntegrationTestUtilities, IntegrationTes
with
LogCapture
(
level
=
logging
.
WARNING
)
as
log_capture
:
super
(
SuccessFactorsIntegrationTest
,
self
)
.
test_register
()
expected_message
=
'Unable to retrieve user details with username {username} from SAPSuccessFactors '
\
'for company ID {company_id} with url "{odata_api_url}" and error message: '
\
'500 Server Error: Internal Server Error for url: {odata_api_url}'
.
format
(
'for company ID {company_id} with url "{odata_api_url}". Error message: '
\
'500 Server Error: Internal Server Error for url: {odata_api_url}. System message: '
\
'Not available.'
.
format
(
username
=
self
.
USER_USERNAME
,
company_id
=
odata_company_id
,
odata_api_url
=
mocked_odata_ai_url
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment