fix response with problems in connections

This commit is contained in:
Cayo Puigdefabregas 2023-11-29 13:22:13 +01:00
parent 4f1a5afea7
commit 89f1668c5c

View file

@ -159,7 +159,15 @@ class DemandAuthorizationView(MyWallet, FormView):
return kwargs
def form_valid(self, form):
authorization = form.save()
try:
authorization = form.save()
except Exception:
txt = _("Problems connecting with {url}").format(
url=form.org.response_uri
)
messages.error(self.request, txt)
return super().form_valid(form)
if authorization:
return redirect(authorization)
else: