From 0443cb0fc3cce6d7e6eff11b97b9f5b5914939c1 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 21 Feb 2024 15:43:10 -0300 Subject: [PATCH] fix: responder con forbidden cuando los registros no sean validos --- app/controllers/api/v1/webhooks/concerns/webhook_concern.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/api/v1/webhooks/concerns/webhook_concern.rb b/app/controllers/api/v1/webhooks/concerns/webhook_concern.rb index a546a55c..b94c91f6 100644 --- a/app/controllers/api/v1/webhooks/concerns/webhook_concern.rb +++ b/app/controllers/api/v1/webhooks/concerns/webhook_concern.rb @@ -11,6 +11,7 @@ module Api included do # Responde con forbidden si falla la validaciĆ³n del token rescue_from ActiveRecord::RecordNotFound, with: :platforms_answer + rescue_from ActiveRecord::RecordInvalid, with: :platforms_answer private