diff --git a/app/controllers/session_controller.rb b/app/controllers/session_controller.rb index 1b755a2d931..6a09a8060e5 100644 --- a/app/controllers/session_controller.rb +++ b/app/controllers/session_controller.rb @@ -112,6 +112,8 @@ class SessionController < ApplicationController else render text: I18n.t("sso.not_found"), status: 500 end + rescue ActiveRecord::RecordInvalid => e + render text: I18n.t("sso.unknown_error"), status: 500 rescue => e details = {} SingleSignOn::ACCESSORS.each do |a| diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 04bd73c1c65..8210d689e67 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1345,10 +1345,10 @@ en: user: 'Users' sso: - not_found: "Unable to lookup or create account, contact site admin" - account_not_approved: "Account is pending approval, you will receive an email notification once approved" - unknown_error: "Error updating information, contact site admin" - timeout_expired: "Account login timed out, please try logging in again" + not_found: "Your account couldn't be found. Please contact the site's administrator." + account_not_approved: "Your account is pending approval. You will receive an email notification when you are approved." + unknown_error: "There is a problem with your account. Please contact the site's administrator." + timeout_expired: "Account login timed out, please try logging in again." original_poster: "Original Poster" most_posts: "Most Posts"