mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
better error message when API authentication fails
This commit is contained in:
@ -171,7 +171,7 @@ class ApplicationController < ActionController::Base
|
||||
begin
|
||||
current_user
|
||||
rescue Discourse::InvalidAccess
|
||||
return render plain: I18n.t(type), status: status_code
|
||||
return render plain: I18n.t(opts[:custom_message] || type), status: status_code
|
||||
end
|
||||
|
||||
render html: build_not_found_page(status_code, opts[:include_ember] ? 'application' : 'no_ember')
|
||||
|
Reference in New Issue
Block a user