Traceback
File "apps/erpnext_germany/erpnext_germany/utils/eu_vat.py", line 25, in parse_vat_id
raise ValueError("Invalid country code")
ValueError: Invalid country code
Reproduction (Example)
In Customer: Add a Whitespace at the start of tax_id – like this: " DE329035522".
Problem(s)
- The Error message is neither explainatory, nor actionable (People have no clue what "Invalid country code" means)
- Also we could prevent the example with the problematic withespace.
Solutions
- New Error message: "Invalid country code in {0}“.format( ... label of tax_id ...)
- Strip String
Traceback
Reproduction (Example)
In Customer: Add a Whitespace at the start of
tax_id– like this: " DE329035522".Problem(s)
Solutions