Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

501
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!