问题 I have following code which I using for handling Magento 2 REST API. return new Promise((resolve, reject) => { fetch(uri, { method, headers, body: JSON.stringify(data) }) .then(response => { return response.json(); }) .then(responseData => { resolve(responseData); }) .catch(error => { reject(error); }); }); And I want to add response status checking, so I've started like this return new Promise((resolve, reject) => { fetch(uri, { method, headers, body: JSON.stringify(data) }) .then(response =