amzn / selling-partner-api-models

This repository contains OpenAPI models for developers to use when developing software to call Selling Partner APIs.
Apache License 2.0
534 stars 722 forks source link

BuyerCustomizedInfo CustomizedURL connect ETIMEDOUT #4008

Open ronaldofreitas opened 5 days ago

ronaldofreitas commented 5 days ago

In our integration with SP-API we need to get the URL data from BuyerCustomizedInfo CustomizedURL, and this is working, but with some frequency it has given an error:

connect ETIMEDOUT 52.46.134.66:443

Here is part of the code and environment.

const zipurl = 'URL_CustomizedURL' const orderItemId = '_ORDER_ITEM_ID' const outputPath = ./zip_files/${orderItemId}.zip await axios({ method: 'GET', url: zipurl, responseType: 'stream' }).then(response => { const writer = createWriteStream(resolve(outputPath)) response.data.pipe(writer) return new Promise((resolve, reject) => { writer.on('finish', resolve) writer.on('error', reject) }); }).then(async () =>

...

const buyerInfoEndpoint = /orders/v0/orders/${orderId}/orderItems/buyerInfo const rdt_object_buyerinfo = {"method": "GET", "path": ${buyerInfoEndpoint}}

...

"axios": "^1.6.8" Nodejs V18 Ubuntu 23.04

Does anyone have any idea why this happens completely unexpectedly and randomly, while everything else works correctly?