From b46ced2b6fe3349b208c588592dfaf1296708217 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Fri, 31 Oct 2025 10:26:10 +0200 Subject: [PATCH] add log --- app/controllers/api/attachments_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/api/attachments_controller.rb b/app/controllers/api/attachments_controller.rb index dc99668b..9d86b923 100644 --- a/app/controllers/api/attachments_controller.rb +++ b/app/controllers/api/attachments_controller.rb @@ -35,6 +35,8 @@ module Api render json: attachment.as_json(only: %i[uuid created_at], methods: %i[url filename content_type]) rescue Submitters::MaliciousFileExtension => e + Rollbar.error(e) if defined?(Rollbar) + render json: { error: e.message }, status: :unprocessable_entity end