From 2be2c9aa04845c06a140cd0992bcb963f7ab1a8b Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 4 Mar 2025 16:32:18 +0530 Subject: [PATCH] feat: throw malformed request for standard error --- app/controllers/facebook/delete_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/facebook/delete_controller.rb b/app/controllers/facebook/delete_controller.rb index c0ca16501..00e9b145d 100644 --- a/app/controllers/facebook/delete_controller.rb +++ b/app/controllers/facebook/delete_controller.rb @@ -17,5 +17,8 @@ class Facebook::DeleteController < ApplicationController render json: { url: status_url, confirmation_code: id_to_process }, status: :ok rescue InvalidDigestError render json: { error: 'Invalid signature' }, status: :unprocessable_entity + rescue StandardError => e + ChatwootExceptionTracker.new(e).capture_exception + render json: { error: e.message }, status: :malformed_request end end