upstream_unavailable
HTTP Status: 503 Service Unavailable
Example response
What happened?
The upstream VAT validation service could not be reached at all. This happens when:- VIES (EU) or HMRC (UK) is down for maintenance
- A network timeout occurred while connecting to the upstream service
- 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:
- 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 or HMRC) is having issues, not the Vatly API itself
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.
Related errors
upstream_error— Upstream responded but with an error status