From fef712e7671f0a51a10d73a8b2d83f440bf00d4d Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Fri, 10 Feb 2023 14:18:46 +0100 Subject: [PATCH] Log more details in schema service (#1339) --- packages/services/schema/src/orchestrators.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/services/schema/src/orchestrators.ts b/packages/services/schema/src/orchestrators.ts index c281e3327..1f3d835a6 100644 --- a/packages/services/schema/src/orchestrators.ts +++ b/packages/services/schema/src/orchestrators.ts @@ -243,7 +243,13 @@ const createFederation: ( }; const response: unknown = await retry( - async () => { + async (_, attempt) => { + logger.debug( + 'Calling external composition service (broker=%s, attempt=%s, url=%s)', + external.broker ? 'yes' : 'no', + attempt, + external.endpoint, + ); const res = await (external.broker ? fetch(external.broker.endpoint, { method: 'POST', @@ -300,7 +306,11 @@ const createFederation: ( ).catch(async error => { // The expected error if (error instanceof NetworkError) { - logger.info('Network error so return failure'); + logger.info( + 'Network error so return failure (status=%s, message=%s)', + error.statusCode, + error.message, + ); return { type: 'failure', result: {