Skip to content

Commit

Permalink
improve "Browser client is out of date" error message
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenlouv authored Nov 12, 2019
1 parent d00be34 commit 3a843f2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/legacy/server/http/version_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@ 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 (Header "${versionHeader}" was ${versionRequested} but should be ${actualVersion})`,
{
expected: actualVersion,
got: versionRequested,
}
);
}

return h.continue;
Expand Down

0 comments on commit 3a843f2

Please sign in to comment.