This commit is contained in:
Ilya Ig. Petrov 2017-06-03 21:28:44 +05:00
parent 009184aaee
commit b93958a8aa

View File

@ -79,13 +79,14 @@ export default function getApp(theState) {
headers: new Headers(headers), headers: new Headers(headers),
}; };
const ghUrl = `https://api.github.com/repos/anticensorship-russia/for-testing-github-api/issues/1/comments${query}`; //const ghUrl = `https://api.github.com/repos/anticensorship-russia/for-testing-github-api/issues/1/comments${query}`;
const ghUrl = `http://httpstat.us/418`;
const [comments, etag] = await fetch( const [comments, etag] = await fetch(
ghUrl, ghUrl,
params params
).then( ).then(
(res) => !( res.status >= 200 && res.status < 300 || res.status === 304 ) (res) => !( res.status >= 200 && res.status < 300 || res.status === 304 )
? Promise.reject(new Error(`Полечен ответ с неудачным кодом ${res.status}.`)) ? Promise.reject(new Error(`Получен ответ с неудачным кодом ${res.status}.`))
: res : res
).then( ).then(
(res) => Promise.all([ (res) => Promise.all([