Skip to content

Commit 63f1350

Browse files
use rails logger instead of sentry for error logging in chatbot controller (#24668)
* use rails logger instead of sentry for error logging * Update app/controllers/v0/chatbot/claim_status_controller.rb Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * use the shared logging utils instead --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 72a4bc8 commit 63f1350

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/controllers/v0/chatbot/claim_status_controller.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
require 'concurrent'
55
require 'chatbot/report_to_cxi'
66
require 'lighthouse/benefits_claims/service'
7+
require 'vets/shared_logging'
78

89
module V0
910
module Chatbot
1011
class ClaimStatusController < SignIn::ServiceAccountApplicationController
1112
include IgnoreNotFound
13+
include Vets::SharedLogging
1214
service_tag 'chatbot'
1315
rescue_from 'EVSS::ErrorMiddleware::EVSSError', with: :service_exception_handler
1416

@@ -114,13 +116,13 @@ def order_claims_lighthouse(claims)
114116

115117
def service_exception_handler(exception)
116118
context = 'An error occurred while attempting to retrieve the claim(s).'
117-
log_exception_to_sentry(exception, 'context' => context)
119+
log_exception_to_rails(exception, 'error', context)
118120
render nothing: true, status: :service_unavailable
119121
end
120122

121123
def report_exception_handler(exception)
122124
context = 'An error occurred while attempting to report the claim(s).'
123-
log_exception_to_sentry(exception, 'context' => context)
125+
log_exception_to_rails(exception, 'error', context)
124126
end
125127

126128
def log_no_claims_found(exception)

0 commit comments

Comments
 (0)