forked from External/greenlight
GRN2-192: Made error pages more descriptive (#620)
* GRN2-192 * Brought back error codes
This commit is contained in:
committed by
Jesus Federico
parent
523d9a38f2
commit
c7a0c6a463
@ -141,7 +141,11 @@ class ApplicationController < ActionController::Base
|
||||
retrieve_provider_info(@user_domain, 'api2', 'getUserGreenlightCredentials')
|
||||
rescue => e
|
||||
if e.message.eql? "No user with that id exists"
|
||||
render "errors/not_found", locals: { user_not_found: true }
|
||||
render "errors/not_found", locals: { message: I18n.t("errors.not_found.user_not_found.message"),
|
||||
help: I18n.t("errors.not_found.user_not_found.help") }
|
||||
elsif e.message.eql? "Provider not included."
|
||||
render "errors/not_found", locals: { message: I18n.t("errors.not_found.user_missing.message"),
|
||||
help: I18n.t("errors.not_found.user_missing.help") }
|
||||
else
|
||||
render "errors/internal_error"
|
||||
end
|
||||
|
@ -21,10 +21,6 @@ class ErrorsController < ApplicationController
|
||||
render status: 404, formats: :html
|
||||
end
|
||||
|
||||
def unprocessable
|
||||
render status: 422, formats: :html
|
||||
end
|
||||
|
||||
def internal_error
|
||||
render status: 500, formats: :html
|
||||
end
|
||||
|
Reference in New Issue
Block a user