Better error for VineVoucherValidatorService

Co-authored-by: David Cook <david@redcliffs.net>
This commit is contained in:
Gaetan Craig-Riou
2024-11-04 15:45:59 +11:00
committed by Rachel Arnould
parent d7313ffec9
commit e7ece294cc
3 changed files with 8 additions and 8 deletions

View File

@@ -576,10 +576,10 @@ en:
payment_could_not_complete: "The payment could not be completed"
vine_voucher_validator_service:
errors:
vine_settings: "No Vine api settings for the given enterprise"
vine_api: "There was an error communicating with the API"
vine_settings: "This shop is not enabled for VINE Vouchers."
vine_api: "There was an error communicating with the API, please try again later."
invalid_voucher: "The voucher is not valid"
not_found_voucher: "The voucher doesn't exist"
not_found_voucher: "Sorry, we couldn't find that voucher, please check the code."
vine_voucher_redeemer_service:
errors:
vine_settings: "No Vine api settings for the given enterprise"

View File

@@ -199,7 +199,7 @@ RSpec.describe Vine::VoucherRedeemerService, feature: :connected_apps do
voucher_redeemer_service.redeem
expect(voucher_redeemer_service.errors).to include(
{ vine_api: "There was an error communicating with the API" }
{ vine_api: "There was an error communicating with the API, please try again later." }
)
end

View File

@@ -78,7 +78,7 @@ RSpec.describe Vine::VoucherValidatorService, feature: :connected_apps do
validate_voucher_service.validate
expect(validate_voucher_service.errors).to include(
{ vine_settings: "No Vine api settings for the given enterprise" }
{ vine_settings: "This shop is not enabled for VINE Vouchers." }
)
end
@@ -106,7 +106,7 @@ RSpec.describe Vine::VoucherValidatorService, feature: :connected_apps do
validate_voucher_service.validate
expect(validate_voucher_service.errors).to include(
{ vine_api: "There was an error communicating with the API" }
{ vine_api: "There was an error communicating with the API, please try again later." }
)
end
@@ -150,7 +150,7 @@ RSpec.describe Vine::VoucherValidatorService, feature: :connected_apps do
validate_voucher_service.validate
expect(validate_voucher_service.errors).to include(
{ vine_api: "There was an error communicating with the API" }
{ vine_api: "There was an error communicating with the API, please try again later." }
)
end
@@ -186,7 +186,7 @@ RSpec.describe Vine::VoucherValidatorService, feature: :connected_apps do
validate_voucher_service.validate
expect(validate_voucher_service.errors).to include(
{ not_found_voucher: "The voucher doesn't exist" }
{ not_found_voucher: "Sorry, we couldn't find that voucher, please check the code." }
)
end