Share feedback, ideas and get community help

Updated 3 months ago

location return code stopped working

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