Skip to content

Commit

Permalink
[department-of-veterans-affairs/va-virtual-agent#873] Adds logging fo… (
Browse files Browse the repository at this point in the history
#12489)

* [department-of-veterans-affairs/va-virtual-agent#873] Adds logging for appeals in staging

* [department-of-veterans-affairs/va-virtual-agent#873] Fixes linting

* [department-of-veterans-affairs/va-virtual-agent#873] More linting fixes
  • Loading branch information
ksk385 authored Apr 27, 2023
1 parent 23c7f1f commit 9df5c53
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ module VirtualAgent
class VirtualAgentAppealController < AppealsBaseController
def index
if Settings.vsp_environment == 'staging'
Rails.logger.info 'Getting appeals from Lighthouse for staging environment'
@user_ssan, @user_name = set_user_credentials
appeals_response = get_appeal_from_lighthouse(@user_ssan, @user_name)
appeals_data_array = appeals_response['data']
Rails.logger.info "Retrieved #{appeals_data_array.count} appeals from Lighthouse for staging environment"
else
begin
appeals_response = appeals_service.get_appeals(current_user)
appeals_data_array = appeals_response.body['data']
rescue => e
return service_exception_handler(e)
end
appeals_response = appeals_service.get_appeals(current_user)
appeals_data_array = appeals_response.body['data']
end
data = data_for_first_comp_appeal(appeals_data_array)
render json: {
data:
}
rescue => e
service_exception_handler(e)
end

def get_appeal_from_lighthouse(ssan, user_name)
Expand Down

0 comments on commit 9df5c53

Please sign in to comment.