[password-resets] Return exception on screen



commit d47588d2a8056f89111b33b5432f0f13340b1e17
Author: Andrea Veri <averi redhat com>
Date:   Mon Nov 23 13:19:15 2020 +0100

    Return exception on screen

 app.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/app.py b/app.py
index e0411f1..b3d3ca9 100644
--- a/app.py
+++ b/app.py
@@ -104,10 +104,11 @@ def form_reset_post(request: Request, token: str, password: str = Form(...)):
             Session.remove()
 
             return templates.TemplateResponse('general-form.html', context={'request': request, 
'passwordsuccess': True})
-        except:
+        except Exception as e:
+            return { 'exception': e }
             Session.remove()
 
-            return templates.TemplateResponse('general-form.html', context={'request': request, 
'passworderror': True})
+            #return templates.TemplateResponse('general-form.html', context={'request': request, 
'passworderror': True})
 
 def send_email(email, token):
     import imghdr


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]