feat: throw malformed request for standard error

This commit is contained in:
Shivam Mishra
2025-03-04 16:32:18 +05:30
parent d9b86182f2
commit 2be2c9aa04
@@ -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