mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 18:41:07 +08:00
FIX: better error message when topic deletion fails
This commit is contained in:
@ -557,6 +557,8 @@ class TopicsController < ApplicationController
|
||||
PostDestroyer.new(current_user, first_post, context: params[:context]).destroy
|
||||
|
||||
render body: nil
|
||||
rescue Discourse::InvalidAccess
|
||||
render_json_error I18n.t("delete_topic_failed")
|
||||
end
|
||||
|
||||
def recover
|
||||
|
Reference in New Issue
Block a user