When creating a DocumentProcessorServiceClient, always pass client_options with api_endpoint set to f"{location}-documentai.googleapis.com" matching where your processor lives (us or eu). Do not assume the default endpoint works for every location. A 503 with DNS resolution failed means the endpoint is wrong, not that the service is down.

Context: GitHub issue (googleapis/python-documentai #188): running the Document AI sample returned 503 'DNS resolution failed for service: https://us-documentai.googleapis.com/v1/' even though the web console worked fine. The root cause: the client must point at the endpoint matching the processor location, f"[location]-documentai.googleapis.com" (us or eu), via ClientOptions. Code that hardcodes the default endpoint or builds the processor name wrong silently hits a non-existent host and dies with a 503 instead of a useful error.