Skip to content

Commit

Permalink
API-27427-500-errors-claims-status-v2 (#12994)
Browse files Browse the repository at this point in the history
* Adds safe return with dig

* Adds a return of an empty object in the case of a rescue due to EVSS outage
  • Loading branch information
stiehlrod authored Jun 15, 2023
1 parent 88efbe3 commit e86a61d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ def get_evss_documents(claim_id)
log_message_to_sentry('Error in Claims v2 show calling EVSS Doc Service',
:error,
body: e.message)
{}
end

def build_supporting_docs(bgs_claim)
Expand All @@ -511,7 +512,7 @@ def build_supporting_docs(bgs_claim)
else
get_evss_documents(bgs_claim[:benefit_claim_details_dto][:benefit_claim_id])
end
return [] if docs.nil? || docs['documents'].blank?
return [] if docs.nil? || docs&.dig('documents').blank?

@supporting_documents = docs['documents']

Expand Down

0 comments on commit e86a61d

Please sign in to comment.