Добрый день
При получение запросов у него есть отклоненный дублер. Как заставить fetch брать не пустой ответ отклоненного запроса, а именно тот, что имеет успешный статус?
let data = await fetch("https://website/en/dashboard/entries", {
"headers": {
"accept": "*/*",
"accept-language": "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"98\", \"Google Chrome\";v=\"98\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"Windows\"",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"account-id": ID[1],
"user-id": "cs31dfv13sd123f2342fs",
"x-requested-with": "XMLHttpRequest",
"cookie": `PHPSESSID=${cookiesPHP}; ${cookiesNoPHP}`,
"Referer": 'https://app.website.com/en/dashboard/',
"Referrer-Policy": "strict-origin-when-cross-origin",
},
"referrer": "https://app.website.com/en/dashboard/",
"referrerPolicy": "strict-origin-when-cross-origin",
"body": `_=${currentTime}&sessionId=${SESSIONID_param}&viewType=panels&entryType=product&periodStart=${periodStart}&periodEnd=${periodStart}&periodicity=period&sortField=units&sortDirection=desc&page=1&groupByAsin=&groupBy=&rangeStart=${rangeStart}&rangeEnd=${rangeEnd}&rangePeriodicity=month&trendsParameter=sales`,
"method": "POST",
"mode": "cors"
}).then(async response => console.log(await (response.json()))