JARVIS-482 Added support for 401 errors on json requests