Skip to content

Commit

Permalink
Merge pull request #2259 from alphagov/359/log-warning-when-document-…
Browse files Browse the repository at this point in the history
…not-found

Log a warning on DocumentNotFound
  • Loading branch information
mtaylorgds committed Jul 25, 2024
2 parents b3e3d97 + 39c461c commit 001eb02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ def setup_view_paths_for(publication)
prepend_view_path template_folder_for(publication)
end

def record_not_found
def record_not_found(exception)
Rails.logger.warn "Error loading document: #{exception.message}"
render body: { 'raw': "404 Not Found" }, status: :not_found
end

Expand Down

0 comments on commit 001eb02

Please sign in to comment.