We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abd3980 commit c97a510Copy full SHA for c97a510
firebase_admin/_token_gen.py
@@ -120,6 +120,9 @@ def _init_signing_provider(self):
120
# Attempt to discover a service account email from the local Metadata service. Use it
121
# with the IAM service to sign bytes.
122
resp = self.request(url=METADATA_SERVICE_URL, headers={'Metadata-Flavor': 'Google'})
123
+ if resp.status != 200:
124
+ raise ValueError(
125
+ 'Failed to contact the local metadata service: {0}.'.format(resp.data.decode()))
126
service_account = resp.data.decode()
127
return _SigningProvider.from_iam(self.request, google_cred, service_account)
128
0 commit comments