Bugfixes core: return JSON for non-HTML server route errors (#5442) (6deccf6) react: safe use of localStorage API (#5444) (f770b90)