GRN2-265: No longer throws 500 if provider not included (#944)

* No longer throws 500 if provider not included

* Rubocop fix
This commit is contained in:
Ahmad Farhat 2020-02-14 10:03:16 -05:00 committed by GitHub
parent 3641f1b953
commit 31258272c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -220,6 +220,7 @@ class ApplicationController < ActionController::Base
logger.error "Error in retrieve provider info: #{e}" logger.error "Error in retrieve provider info: #{e}"
# Use the default site settings # Use the default site settings
@user_domain = "greenlight" @user_domain = "greenlight"
@settings = Setting.find_or_create_by(provider: @user_domain)
if e.message.eql? "No user with that id exists" if e.message.eql? "No user with that id exists"
render "errors/greenlight_error", locals: { message: I18n.t("errors.not_found.user_not_found.message"), render "errors/greenlight_error", locals: { message: I18n.t("errors.not_found.user_not_found.message"),