Share feedback, ideas and get community help

Updated 6 months ago

location return code stopped working

At a glance

A community member is experiencing an issue with their geolocation code, which was working previously but is now crashing their chatbot. They have provided the code, which uses the GeoJS API to fetch the user's location. Another community member suggests trying again, as the bug may have been fixed, and the original poster confirms that the issue has been resolved and expresses gratitude.

Useful resources
I have a geolocation code that was working until yesterday, today it is giving an error and crashing my chat bot. what could be happening? (follow the code below)

async function obterLocalizacao() { try { const response = await fetch('https://get.geojs.io/v1/ip/geo.json'); const data = await response.json(); const cidade = data.city || "Local Desconhecido"; return cidade; } catch (error) { console.error('Erro ao obter a localizaĆ§Ć£o:', error); return "Local Desconhecido"; } } return await obterLocalizacao();
B
T
2 comments
Can you try again, is the bug fixed?
hi, yes, everything ok. thanks a lot.
Add a reply
Sign up and join the conversation on Discord