From ac3aa28e860c71d205ab01cab2e79fab6f1027c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Louv-Jansen?= Date: Sat, 16 Nov 2019 10:15:46 +0100 Subject: [PATCH] Improve "Browser client is out of date" error message (#50296) * improve "Browser client is out of date" error message * Improve wording of error message Co-Authored-By: Josh Dover * Fox formatting * Fix format --- src/legacy/server/http/version_check.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/legacy/server/http/version_check.js b/src/legacy/server/http/version_check.js index 8bd2bb6e22df1..12666c9a0f3f6 100644 --- a/src/legacy/server/http/version_check.js +++ b/src/legacy/server/http/version_check.js @@ -27,10 +27,11 @@ export function setupVersionCheck(server, config) { const versionRequested = req.headers[versionHeader]; if (versionRequested && versionRequested !== actualVersion) { - throw badRequest('Browser client is out of date, please refresh the page', { - expected: actualVersion, - got: versionRequested - }); + throw badRequest( + `Browser client is out of date, \ + please refresh the page ("${versionHeader}" header was "${versionRequested}" but should be "${actualVersion}")`, + { expected: actualVersion, got: versionRequested } + ); } return h.continue;