Closed m1ga closed 7 years ago
Messages like:
{ error_message: 'Browser API keys cannot have referer restrictions when used with this API.', status: 'REQUEST_DENIED', routes: [] } { error_message: 'The provided API key is expired.', status: 'REQUEST_DENIED', routes: [] } { error_message: 'This API project is not authorized to use this API. Please ensure this API is activated in the Google Developers Console: https://console.developers.google.com/apis/api/directions_backend?project=_', status: 'REQUEST_DENIED', routes: [] }
{ error_message: 'Browser API keys cannot have referer restrictions when used with this API.', status: 'REQUEST_DENIED', routes: [] }
{ error_message: 'The provided API key is expired.', status: 'REQUEST_DENIED', routes: [] }
{ error_message: 'This API project is not authorized to use this API. Please ensure this API is activated in the Google Developers Console: https://console.developers.google.com/apis/api/directions_backend?project=_', status: 'REQUEST_DENIED', routes: [] }
appear in the success callback. Should be in the error callback (in my case it was the getDirections() example/method)
getDirections()
Yeah, the Google API doesn't use proper HTTP status codes. I'll add a manual error handling and file a ticket at Google's radar.
Messages like:
appear in the success callback. Should be in the error callback (in my case it was the
getDirections()
example/method)