From 177b9d83d986cc679c8c48fc7285d32b32d59043 Mon Sep 17 00:00:00 2001 From: Paul Fitzpatrick Date: Tue, 23 Aug 2022 17:11:58 -0400 Subject: [PATCH] (core) add a log message on proxying failures Summary: When a home server fails to fetch from a doc worker, errors are passed along to clients but we don't get to see them. This fixes that omission. Test Plan: tested manually, by inserting some code to delay serving particular test documents. Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3601 --- app/server/lib/AppEndpoint.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/server/lib/AppEndpoint.ts b/app/server/lib/AppEndpoint.ts index 557774ca..a0455882 100644 --- a/app/server/lib/AppEndpoint.ts +++ b/app/server/lib/AppEndpoint.ts @@ -152,6 +152,13 @@ async function getWorker(docWorkerMap: IDocWorkerMap, assignmentId: string, } // This is a 404 with the expected content for a missing worker. } catch (e) { + log.rawDebug(`AppEndpoint.getWorker failure`, { + url: fullUrl, + docId: assignmentId, + status: e.status, + message: String(e), + workerId: docStatus.docWorker.id, + }); // If workers are managed, no errors merit continuing except a 404. // Otherwise, we continue if we see a system error (e.g. ECONNREFUSED). // We don't accept timeouts since there is too much potential to