Skip to content

A platform for community discussion. Free, open, simple.

Log exception if remote theme importing failed

Vinoth Kannan16341219ab15
diff --git a/app/controllers/admin/themes_controller.rb b/app/controllers/admin/themes_controller.rb
index 99b4caa3bd7..a40ec46998d 100644
--- a/app/controllers/admin/themes_controller.rb
+++ b/app/controllers/admin/themes_controller.rb
@@ -78,7 +78,8 @@ class Admin::ThemesController < Admin::AdminController
begin
@theme = RemoteTheme.import_theme(params[:remote], current_user, private_key: params[:private_key])
render json: @theme, status: :created
- rescue RuntimeError
+ rescue RuntimeError => e
+ Discourse.warn_exception(e, message: "Error importing theme")
render_json_error I18n.t('themes.error_importing')
end
elsif params[:bundle]