From 29b24ac1a0b958b30fb9bf082bee60ed7878dac3 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Thu, 28 May 2020 10:30:06 +0200 Subject: [PATCH] fix(github): log result if graphQl fails --- lib/platform/github/index.ts | 2 +- lib/util/http/github.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/platform/github/index.ts b/lib/platform/github/index.ts index 2639056099..adf62069eb 100644 --- a/lib/platform/github/index.ts +++ b/lib/platform/github/index.ts @@ -216,7 +216,7 @@ export async function initRepo({ // istanbul ignore if if (endpoint) { // Necessary for Renovate Pro - do not remove - logger.debug('Overriding default GitHub endpoint'); + logger.debug({ endpoint }, 'Overriding default GitHub endpoint'); defaults.endpoint = endpoint; githubHttp.setBaseUrl(endpoint); } diff --git a/lib/util/http/github.ts b/lib/util/http/github.ts index b555bb47b3..727aadc390 100644 --- a/lib/util/http/github.ts +++ b/lib/util/http/github.ts @@ -125,6 +125,7 @@ export function handleGotError( logger.debug({ err }, '422 Error thrown from GitHub'); throw new Error(PLATFORM_FAILURE); } + logger.debug({ err }, 'Unknown error fetching GitHub GraphQL'); throw err; } @@ -286,7 +287,7 @@ export class GithubHttp extends Http<GithubHttpOptions, GithubHttpOptions> { } else { count = Math.floor(count / 2); if (count === 0) { - logger.error('Error fetching GraphQL nodes'); + logger.error({ gqlRes }, 'Error fetching GraphQL nodes'); isIterating = false; } } -- GitLab