- Issue created by @dieterholvoet
- 🇧🇪Belgium dieterholvoet Brussels
Apparently there are more possible error codes that we could handle:
In case of problems, the returned FaultString can take the following specific values:
INVALID_INPUT: The provided CountryCode is invalid or the VAT number is empty;
GLOBAL_MAX_CONCURRENT_REQ: Your Request for VAT validation has not been processed; the maximum number of concurrent requests has been reached.
Please re-submit your request later or contact TAXUD-VIESWEB@ec.europa.eu for further information": Your request cannot be processed due to high traffic on the web application. Please try again later;MS_MAX_CONCURRENT_REQ: Your Request for VAT validation has not been processed; the maximum number of concurrent requests for this Member State has been reached.
Please re-submit your request later or contact TAXUD-VIESWEB@ec.europa.eu for further information": Your request cannot be processed due to high traffic towards the Member State you are trying to reach. Please try again later.SERVICE_UNAVAILABLE: an error was encountered either at the network level or the Web application level, try again later;
MS_UNAVAILABLE: The application at the Member State is not replying or not available. Please refer to the Technical Information page to check the status of the requested Member State, try again later;
TIMEOUT: The application did not receive a reply within the allocated time period, try again later.
I thought about this some more and I feel like we should provide an option to choose what to do when connection to the database fails: fail validation and ask the user to try again later, or pass validation and only rely on the regex-based validation. These requirements can depend on the application, so I think it makes sense to make it configurable.
- 🇧🇪Belgium dieterholvoet Brussels
I added a 'Fail validation if the VIES database is unavailable' option that allows you to pass validation if the VIES database is unreachable. This option is enabled by default, so existing installations are not impacted.
-
dieterholvoet →
committed 8f9d6b42 on 2.0.x
Issue #3491056 by dieterholvoet: Improve VIES error handling
-
dieterholvoet →
committed 8f9d6b42 on 2.0.x