mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:41:25 +08:00
UX: Return a friendlier error when the CSV is invalid. Added a cancel button to return to the /badges view
This commit is contained in:
@ -64,7 +64,7 @@ class Admin::BadgesController < Admin::AdminController
|
||||
|
||||
head :ok
|
||||
rescue CSV::MalformedCSVError
|
||||
raise Discourse::InvalidParameters
|
||||
render_json_error I18n.t('badges.mass_award.errors.invalid_csv'), status: 400
|
||||
end
|
||||
|
||||
def badge_types
|
||||
|
Reference in New Issue
Block a user