diff --git a/modules/claims_api/app/sidekiq/claims_api/service_base.rb b/modules/claims_api/app/sidekiq/claims_api/service_base.rb index 0dd2bcaa841..6c95e9b1ea2 100644 --- a/modules/claims_api/app/sidekiq/claims_api/service_base.rb +++ b/modules/claims_api/app/sidekiq/claims_api/service_base.rb @@ -51,7 +51,8 @@ def save_auto_claim!(auto_claim, status) def set_evss_response(auto_claim, error) auto_claim.evss_response = [] error_messages = get_error_message(error) - error_messages.uniq.each do |error_message| + messages = error_messages[:messages].presence || error_messages + messages.uniq.each do |error_message| error_key = get_error_key(error_message) error_text = get_error_text(error_message) auto_claim.evss_response << @@ -109,7 +110,7 @@ def get_original_status_code(error) def will_retry?(auto_claim, error) msg = if auto_claim.evss_response.present? - auto_claim.evss_response&.dig(0, 'text') + auto_claim.evss_response&.dig(0, 'key') elsif error.respond_to? :original_body get_error_key(error.original_body) else