From b53a1d99fa83f1249372bdf1bc7396ceb10372d0 Mon Sep 17 00:00:00 2001 From: John Luo Date: Mon, 23 Dec 2024 11:50:25 -0500 Subject: [PATCH] Reduce modality error log to info (#20008) * Reduce modality error log to info * Revert typo --- modules/vaos/app/services/vaos/v2/appointments_service.rb | 2 +- modules/vaos/spec/services/v2/appointment_service_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/vaos/app/services/vaos/v2/appointments_service.rb b/modules/vaos/app/services/vaos/v2/appointments_service.rb index db640ff117d..3b2dd1d6a69 100644 --- a/modules/vaos/app/services/vaos/v2/appointments_service.rb +++ b/modules/vaos/app/services/vaos/v2/appointments_service.rb @@ -774,7 +774,7 @@ def set_modality(appointment) modality = 'communityCare' end - Rails.logger.error("VAOS appointment id #{appointment[:id]} modality cannot be determined.") if modality.nil? + Rails.logger.info("VAOS appointment id #{appointment[:id]} modality cannot be determined.") if modality.nil? appointment[:modality] = modality end diff --git a/modules/vaos/spec/services/v2/appointment_service_spec.rb b/modules/vaos/spec/services/v2/appointment_service_spec.rb index 54ca8a13f7f..40aa453beae 100644 --- a/modules/vaos/spec/services/v2/appointment_service_spec.rb +++ b/modules/vaos/spec/services/v2/appointment_service_spec.rb @@ -1730,12 +1730,12 @@ end it 'logs failure to determine modality' do - allow(Rails.logger).to receive(:error).at_least(:once) + allow(Rails.logger).to receive(:info).at_least(:once) appt = FactoryBot.build(:appointment_form_v2, :va_proposed_valid_reason_code_text).attributes appt[:kind] = 'none' subject.send(:set_modality, appt) expect(appt[:modality]).to be_nil - expect(Rails.logger).to have_received(:error).at_least(:once) + expect(Rails.logger).to have_received(:info).at_least(:once) end it 'requires appointment' do