Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions erpnext_germany/utils/eu_vat.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
wait_exponential,
)
from zeep import Client
from zeep.exceptions import XMLSyntaxError

WSDL_URL = "https://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl"
COUNTRY_CODE_REGEX = r"^[A-Z]{2}$"
Expand Down Expand Up @@ -45,6 +46,7 @@ def check_vat(country_code: str, vat_number: str):
retry_if_exception_message(message="MS_UNAVAILABLE"),
retry_if_exception_message(message="TIMEOUT"),
retry_if_exception_type(ConnectionError),
retry_if_exception_type(XMLSyntaxError),
),
stop=stop_after_attempt(3),
wait=wait_exponential(multiplier=1, min=2, max=64),
Expand Down
Loading