move key so it does not interfere with other errors

This commit is contained in:
Sam
2018-03-09 16:41:50 +11:00
parent 8fd47314d9
commit 7c0e6b820e
2 changed files with 2 additions and 3 deletions

View File

@ -80,7 +80,7 @@ class Admin::ThemesController < Admin::AdminController
@theme = RemoteTheme.import_theme(params[:remote], current_user, private_key: params[:private_key])
render json: @theme, status: :created
rescue RuntimeError
render_json_error I18n.t('errors.theme.other')
render_json_error I18n.t('themes.error_importing')
end
else
render json: @theme.errors, status: :unprocessable_entity