Skip to content

Commit

Permalink
Remove redundant rescue_from in ImagesController
Browse files Browse the repository at this point in the history
This is no longer required because the PreviewService doesn't throw any
errors when using #try_create_preview.
  • Loading branch information
Ben Thorner committed Mar 26, 2019
1 parent 3a2c493 commit b85690f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions app/controllers/images_controller.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# frozen_string_literal: true

class ImagesController < ApplicationController
rescue_from GdsApi::BaseError do |e|
GovukError.notify(e)
redirect_to images_path, alert_with_description: t("images.index.flashes.api_error")
end

def index
@edition = Edition.find_current(document: params[:document])
render layout: rendering_context
Expand Down

0 comments on commit b85690f

Please sign in to comment.