You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
? ` This usually means the ${mapsApiNameForUrl(url)} is not enabled on the Google Cloud project for GOOGLE_MAPS_API_KEY, or the key has API restrictions that exclude it. Enable it at https://console.cloud.google.com/apis/library and check the key's restrictions at https://console.cloud.google.com/apis/credentials. This key is separate from Google OAuth, so other working tools do not confirm it is configured.`
68
+
: '';
69
+
thrownewUserError(redactSecrets(`Google Maps API error (${status}): ${displayMessage}${guidance}`));
'Google Maps API error (PERMISSION_DENIED): API not enabled. This usually means the Places API (New) is not enabled on the Google Cloud project for GOOGLE_MAPS_API_KEY, or the key has API restrictions that exclude it. Enable it at https://console.cloud.google.com/apis/library and check the key\'s restrictions at https://console.cloud.google.com/apis/credentials. This key is separate from Google OAuth, so other working tools do not confirm it is configured.',
44
+
);
45
+
});
46
+
47
+
it('guides a legacy Geocoding API request denial',async()=>{
'Google Maps API error (REQUEST_DENIED): API key is not authorized. This usually means the Geocoding API is not enabled on the Google Cloud project for GOOGLE_MAPS_API_KEY, or the key has API restrictions that exclude it. Enable it at https://console.cloud.google.com/apis/library and check the key\'s restrictions at https://console.cloud.google.com/apis/credentials. This key is separate from Google OAuth, so other working tools do not confirm it is configured.',
54
+
);
55
+
});
56
+
57
+
it('guides a bare Routes API HTTP 403',async()=>{
58
+
global.fetch=jest.fn().mockResolvedValue({
59
+
ok: false,
60
+
status: 403,
61
+
statusText: 'Forbidden',
62
+
json: jest.fn().mockRejectedValue(newSyntaxError('Unexpected end of JSON input')),
'Google Maps API error (403): Forbidden. This usually means the Routes API is not enabled on the Google Cloud project for GOOGLE_MAPS_API_KEY, or the key has API restrictions that exclude it. Enable it at https://console.cloud.google.com/apis/library and check the key\'s restrictions at https://console.cloud.google.com/apis/credentials. This key is separate from Google OAuth, so other working tools do not confirm it is configured.',
66
+
);
67
+
});
68
+
69
+
it('keeps non-authorization API errors byte-identical to main',async()=>{
0 commit comments