diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 71499ae5fa..0518a79d69 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -188,7 +188,7 @@ def render_respond_to_format_with_error_message(msg, url_or_path, http_status, e respond_to do |format| # Redirect use to the path and display the error message - format.html { redirect_to url_or_path, alert: msg } + format.any(:html, :pdf) { redirect_to url_or_path, alert: msg } # Render the JSON error message (using API V1) format.json do @payload = { errors: [msg] }