upstream_unavailable
HTTP Status: 503 Service Unavailable
Example response
What happened?
The upstream VAT validation service could not be reached, or it returned an unexpected error. This happens when:- VIES (EU), HMRC (UK), BFS UID Register (CH/LI), Bronnysund Register Centre (NO), or ABR (AU) is down for maintenance
- A network timeout occurred while connecting to the upstream service
- The upstream service returned an unexpected HTTP error status
- An unexpected exception occurred during the validation request
- DNS resolution failed for the upstream service
How to fix
- Retry after the
Retry-Afterheader: The response includesRetry-After: 10, telling you to wait 10 seconds before retrying. Then use exponential backoff, doubling each time up to a maximum of 60 seconds - Check upstream service status:
- VIES: https://ec.europa.eu/taxation_customs/vies/
- HMRC: https://api-platform-status.production.tax.service.gov.uk/
- BFS UID Register (CH/LI): https://www.uid.admin.ch/
- Bronnysund Register Centre (NO): https://www.brreg.no/
- ABR (AU): https://abr.business.gov.au/
- Handle gracefully: Show users a message like “VAT validation is temporarily unavailable, please try again later”
Common mistakes
- No retry logic: Always implement retries for 503 errors since they’re transient by nature
- Retrying too aggressively: Use exponential backoff, not a tight loop
- Blaming Vatly: This error means the third-party service (VIES, HMRC, BFS, Bronnysund, or ABR) is having issues, not the Vatly API itself
Catching this error with the SDKs
Stale cache fallback
If Vatly has a previous cached result for the same VAT number, it will serve that result withmeta.stale: true instead of returning a 503 error. See Caching for details.
Member state unavailability
When a specific VIES member state is down (rather than the entire VIES service), Vatly detects this via the VIESuserError field and serves stale cached results with meta.source_status: "unavailable" instead of returning a 503 error. If no stale cache exists, a 503 error with code upstream_member_state_unavailable is returned instead.