diff --git a/lib/platform/github/gh-got-wrapper.js b/lib/platform/github/gh-got-wrapper.js index 3d09a0ccdfc8817c746c77236f067b40baeeb827..eff3ca50d9f6bb5283ce7d90723d9abe319c392f 100644 --- a/lib/platform/github/gh-got-wrapper.js +++ b/lib/platform/github/gh-got-wrapper.js @@ -80,13 +80,15 @@ async function get(path, options, retries = 5) { } // istanbul ignore if if (method === 'POST' && path === 'graphql') { - if (res.errors && retries > 0) { + const goodResult = '{"data":{'; + if (res.body.startsWith(goodResult)) { + if (retries === 0) { + logger.info('Recovered graphql query'); + } + } else if (retries > 0) { logger.info('Retrying graphql query'); return get(path, opts, 0); } - if (res.data && retries === 0) { - logger.info('Recovered graphql query'); - } } return res; } catch (err) {