Bug 1337803: To avoid internal server error in case of malformed error message being received from API server, catch JSONDeodeError

Change-Id: I1782c7501b4b7cc618aaa523c254f1b62a90573f