VAT ID check: Include response in error log

This commit is contained in:
Raphael Michel
2025-02-05 12:50:20 +01:00
parent 85cba253a8
commit f6b0e35e40

View File

@@ -152,7 +152,7 @@ def _validate_vat_id_EU(vat_id, country_code):
valid_elements = envelope.findall('./soap:Body/vat:checkVatResponse/vat:valid', namespaces)
if not valid_elements:
logger.error(
f'VAT ID checking failed for {country_code} due to missing <valid> tag'
f'VAT ID checking failed for {country_code} due to missing <valid> tag, response was: {return_xml}'
)
raise VATIDTemporaryError(error_messages['unavailable'])