Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

500
Vistas
Catching OVER_QUERY_LIMIT error in Google maps distance api

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?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda