From a493694e102219ce34b4d61d66702279f3f4f57c Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 4 May 2017 16:16:02 -0700 Subject: [PATCH] reload: Clean up handling of invalid reload tokens. Previously, we'd log an exception whenever an invalid hashchange reload token appeared, which is probably a bit excessive given that this can happen without anything being wrong. We instead just log something for debugging in the blueslip log and make sure the #reload hash is cleared. --- static/js/reload.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/static/js/reload.js b/static/js/reload.js index 602c18085b..265392c8ad 100644 --- a/static/js/reload.js +++ b/static/js/reload.js @@ -106,7 +106,12 @@ exports.initialize = function reload__initialize() { var ls = localstorage(); var fragment = ls.get(hash_fragment); if (fragment === undefined) { - blueslip.error("Invalid hash change reload token"); + // Since this can happen sometimes with hand-reloading, it's + // not really worth throwing an exception if these don't + // exist, but be log it so that it's available for future + // debugging if an exception happens later. + blueslip.info("Invalid hash change reload token"); + hashchange.changehash(""); return; } ls.remove(hash_fragment);