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

The NearbyStores function doesnt work #122

Closed
SebastianMostert opened this issue Jan 6, 2022 · 8 comments
Closed

The NearbyStores function doesnt work #122

SebastianMostert opened this issue Jan 6, 2022 · 8 comments

Comments

@SebastianMostert
Copy link

import {NearbyStores} from '../index.js';

const nearbyStores=await new NearbyStores('110 S Fairfax Ave, 90036');

console.dir(nearbyStores,{depth:5});

console.log('\n\nFirst store in the list');
console.dir(nearbyStores.stores[0],{depth:0});

C:\Users\mosse\Downloads\node-dominos-pizza-api-master\node-dominos-pizza-api-master\node_modules\node-fetch\lib\index.js:1461
reject(new FetchError(request to ${request.url} failed, reason: ${err.message}, 'system', err));
^
FetchError: request to https://order.dominos.com/power/store-locator?s=110%20S%20Fairfax%20Ave&c=%20%2090036&type=Delivery failed, reason: connect ETIMEDOUT 209.211.200.20:443
at ClientRequest. (C:\Users\mosse\Downloads\node-dominos-pizza-api-master\node-dominos-pizza-api-master\node_modules\node-fetch\lib\index.js:1461:11)
at ClientRequest.emit (node:events:394:28)
at TLSSocket.socketErrorListener (node:_http_client:447:9)
at TLSSocket.emit (node:events:394:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
type: 'system',
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT'
}

@RIAEvangelist
Copy link
Owner

Looks like you timed out, were you making a lot of requests?

@odog2454
Copy link

odog2454 commented May 4, 2022

I seem to be getting a similar error
image

@odog2454
Copy link

odog2454 commented May 4, 2022

From running this
image

@odog2454
Copy link

odog2454 commented May 4, 2022

And like I have tried a large number of different types of addresses

@odog2454
Copy link

odog2454 commented May 5, 2022

After further investigation I found that the request is getting denied and returning HTML which causes the error. Do you know why this might be happening?
image

@odog2454
Copy link

odog2454 commented May 5, 2022

I think this is occuring because I'm in New Zealand. I have seen the bit in the docs on adding international urls but do you know how I would go about finding all the urls needed for New Zealand?

@RIAEvangelist
Copy link
Owner

RIAEvangelist commented May 5, 2022 via email

@odog2454
Copy link

odog2454 commented May 6, 2022

Thanks for the detailed response Brandon!

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

3 participants