File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 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):
452452 msg = "Blocking Cross Origin request from {}." .format (referer )
453453 else :
454454 msg = "Blocking request from unknown origin"
455- raise web .HTTPError (403 , msg )
455+ raise web .HTTPError (403 , msg ) from e
456456 else :
457457 raise
458458
@@ -542,10 +542,10 @@ def get_json_body(self):
542542 body = self .request .body .strip ().decode (u'utf-8' )
543543 try :
544544 model = json .loads (body )
545- except Exception :
545+ except Exception as e :
546546 self .log .debug ("Bad JSON: %r" , body )
547547 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
549549 return model
550550
551551 def write_error (self , status_code , ** kwargs ):
You can’t perform that action at this time.
0 commit comments