I am using the following code to recall the function in case of OVER_QUERY_LIMIT
function renderRoute(){
directionService.route({......}).then(async(response)=>{.....}).catch(async(err)=>{
if(err.code==google.maps.DirectionsStatus.OVER_QUERY_LIMIT){
await sleep(1000);
return Promise.resolve(renderRoute());
}
else{
return Promise.reject(err);
}
}).catch(err=>{console.log(`Error ocurred`})
}
The code is running fine but I am still seeing this error in console :
_.zA {message: 'DIRECTIONS_ROUTE: OVER_QUERY_LIMIT: There was an issue performing a Directions request.', stack: 'Error: DIRECTIONS_ROUTE: OVER_QUERY_LIMIT: There w…s.com/maps-api-v3/api/js/47/3/directions.js:9:405', name: 'MapsServerError', endpoint: 'DIRECTIONS_ROUTE', code: 'OVER_QUERY_LIMIT'}
Is there a way to hide this?