Skip to content

Commit

Permalink
REmoves error message, and uses evss_response on the claim instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
stiehlrod committed Apr 26, 2024
1 parent 26b57fd commit 0b8d3cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,16 @@ def perform(claim_id) # rubocop:disable Metrics/MethodLength
rescue Faraday::ParsingError, Faraday::TimeoutError => e
set_evss_response(auto_claim, e)
error_status = get_error_status_code(e)
error_message = auto_claim.evss_response&.dig(0, 'text')
log_job_progress(claim_id,
"Docker container job errored #{e.class}: #{error_status} #{error_message}")
"Docker container job errored #{e.class}: #{error_status} #{auto_claim&.evss_response}")

log_exception_to_sentry(e)

raise e
rescue ::Common::Exceptions::BackendServiceException => e
set_evss_response(auto_claim, e)
error_message = auto_claim.evss_response&.dig(0, 'text')
log_job_progress(claim_id,
"Docker container job errored #{e.class}: #{error_message}")
"Docker container job errored #{e.class}: #{auto_claim&.evss_response}")
log_exception_to_sentry(e)
# if will_retry?
if will_retry?(auto_claim, e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,20 @@ def perform(claim_id, middle_initial) # rubocop:disable Metrics/MethodLength

start_docker_container_job(auto_claim&.id) if auto_claim.status != errored_state_value
rescue Faraday::ParsingError, Faraday::TimeoutError => e
error_message = auto_claim.evss_response&.dig(0, 'text') if auto_claim.evss_response.present?
set_evss_response(auto_claim, e)
error_status = get_error_status_code(e)

log_job_progress(claim_id,
"526EZ PDF generator faraday error #{e.class}: #{error_status} #{error_message}")
"526EZ PDF generator faraday error #{e.class}: #{error_status} #{auto_claim&.evss_response}")
log_exception_to_sentry(e)

raise e
rescue ::Common::Exceptions::BackendServiceException => e
error_message = auto_claim.evss_response&.dig(0, 'text') if auto_claim.evss_response.present?
set_evss_response(auto_claim, e)
error_status = get_error_status_code(e)

log_job_progress(claim_id,
"526EZ PDF generator errored #{e.class}: #{error_status} #{error_message}")
"526EZ PDF generator errored #{e.class}: #{error_status} #{auto_claim&.evss_response}")
log_exception_to_sentry(e)

raise e
Expand Down

0 comments on commit 0b8d3cb

Please sign in to comment.