Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenStreetMap // Node Error Body used already #357

Open
LBeckX opened this issue Jun 18, 2024 · 7 comments
Open

OpenStreetMap // Node Error Body used already #357

LBeckX opened this issue Jun 18, 2024 · 7 comments

Comments

@LBeckX
Copy link

LBeckX commented Jun 18, 2024

Hi, I am currently getting the following error with OpenStreetMap.

HttpError: body used already for: https://nominatim.openstreetmap.org/search?accept-language=de-DE&addressdetails=1&q=Erlanger Straße+91080+Deutschland&format=json

This is my implementation that worked before.

async function getGeoLocationAddresses(address: string) {
        const geocoder = NodeGeoCoder({provider: 'openstreetmap', email: '[email protected]', language: 'de-DE'})
        const response = await geocoder.geocode(address + ' Deutschland')
        if (!response[0]) {
            throw new Error(`Can not get geolocation - response is empty by address: ${address}`)
        }
        return response
}
@SultanGabriel
Copy link

same here

1 similar comment
@loique
Copy link

loique commented Jun 18, 2024

same here

@SultanGabriel
Copy link

Been able to temporarly fix the issue by applying the changes from PR #346. What happens is that there is a bug in the error handling code which leads to an error and the actual error is not being logged.

@victordalet
Copy link

Same here, but we can still request the API

const response = await fetch(`https://nominatim.openstreetmap.org/search?addressdetails=1&q=${location.address.replace(" ", "+")}&format=json`)
const data = await response.json();

@farrukh-educative
Copy link

The same issue is being faced here. Do we have any update if the issue is fixed or when can it be fixed? Thanks.

@SultanGabriel
Copy link

The same issue is being faced here. Do we have any update if the issue is fixed or when can it be fixed? Thanks.

A fix already should exist for the bug PR #346. I haven't looked again if the PR got merged but you could copy the commit for a temporary fix, it's 4 or 5 lines that need changing

gquittet added a commit to gquittet/recycle-cli that referenced this issue Jul 3, 2024
gquittet added a commit to gquittet/recycle-cli that referenced this issue Jul 3, 2024
@isntfunny
Copy link

Could you release the new version? The PR got merged 2 weeks ago already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants