Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit f61a7be

Browse files
committed
Deal with returned error
1 parent f61030c commit f61a7be

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

chrp/cprp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def index(self, uid='', iss=''):
139139
try:
140140
result = self.rph.begin(link, **args)
141141
except Exception as err:
142-
raise cherrypy.HTTPError(err)
142+
raise cherrypy.HTTPError(message='{}'.format(err))
143143
else:
144144
raise cherrypy.HTTPRedirect(result['url'])
145145

src/oidcrp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def load_registration_response(client):
8282
raise
8383
else:
8484
if 'error' in response:
85-
raise OidcServiceError(response['error'])
85+
raise OidcServiceError(response.to_json())
8686
else:
8787
client.service_context.registration_info = _client_reg
8888

src/oidcrp/oauth2/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ def parse_request_response(self, service, reqresp, response_body_type='',
231231
raise cherrypy.HTTPError("HTTP ERROR: %s [%s] on %s" % (
232232
reqresp.text, reqresp.status_code, reqresp.url))
233233

234+
err_resp['status_code'] = reqresp.status_code
234235
return err_resp
235236
else:
236237
logger.error('Error response ({}): {}'.format(reqresp.status_code,

0 commit comments

Comments
 (0)