From fddc0dab59ffc349f1d7b16b595f2f5668624525 Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 7 Mar 2017 21:23:11 +0100 Subject: make the rescue in account creation less broad It was catching errors that should have led to 500s --- app/models/account.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/account.rb b/app/models/account.rb index d722caa..db4cfbe 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -47,7 +47,7 @@ class Account user_invite_code.save end end - rescue StandardError => ex + rescue VALIDATION_FAILED => ex user.errors.add(:base, ex.to_s) if user ensure if creation_problem?(user, identity) -- cgit v1.2.3