File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -452,7 +452,7 @@ def check_xsrf_cookie(self):
452
452
msg = "Blocking Cross Origin request from {}." .format (referer )
453
453
else :
454
454
msg = "Blocking request from unknown origin"
455
- raise web .HTTPError (403 , msg )
455
+ raise web .HTTPError (403 , msg ) from e
456
456
else :
457
457
raise
458
458
@@ -542,10 +542,10 @@ def get_json_body(self):
542
542
body = self .request .body .strip ().decode (u'utf-8' )
543
543
try :
544
544
model = json .loads (body )
545
- except Exception :
545
+ except Exception as e :
546
546
self .log .debug ("Bad JSON: %r" , body )
547
547
self .log .error ("Couldn't parse JSON" , exc_info = True )
548
- raise web .HTTPError (400 , u'Invalid JSON in body of request' )
548
+ raise web .HTTPError (400 , u'Invalid JSON in body of request' ) from e
549
549
return model
550
550
551
551
def write_error (self , status_code , ** kwargs ):
You can’t perform that action at this time.
0 commit comments