Skip to content

Commit

Permalink
linting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
danlim715 committed Sep 6, 2024
1 parent 247296a commit 46bfe50
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions app/sidekiq/lighthouse/create_intent_to_file_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,7 @@ def perform(in_progress_form_id, veteran_icn, participant_id)
service.create_intent_to_file(itf_type, '')
itf_log_monitor.track_create_itf_success(itf_type, form.created_at.to_s, form.user_account_id)
rescue MissingICNError, MissingParticipantIDError, InvalidITFTypeError, FormNotFoundError => e
if veteran_icn.blank?
itf_log_monitor.track_missing_user_icn(form, e)
elsif participant_id.blank?
itf_log_monitor.track_missing_user_pid(form, e)
elsif form.blank?
itf_log_monitor.track_missing_form(form, e)
elsif itf_type.blank?
itf_log_monitor.track_invalid_itf_type(form, e)
end
triage_rescued_error(veteran_icn, participant_id, e)
rescue => e
itf_log_monitor.track_create_itf_failure(itf_type, form.created_at.to_s, form.user_account_id, e)
raise e
Expand All @@ -100,5 +92,17 @@ def init(in_progress_form_id, icn)
end
raise InvalidITFTypeError, 'Init failed. Form type not supported for auto ITF' if itf_type.blank?
end

def triage_rescued_error(veteran_icn, participant_id, e)
if veteran_icn.blank?
itf_log_monitor.track_missing_user_icn(form, e)
elsif participant_id.blank?
itf_log_monitor.track_missing_user_pid(form, e)
elsif form.blank?
itf_log_monitor.track_missing_form(form, e)
elsif itf_type.blank?
itf_log_monitor.track_invalid_itf_type(form, e)
end
end
end
end

0 comments on commit 46bfe50

Please sign in to comment.