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

Change-Id: I1782c7501b4b7cc618aaa523c254f1b62a90573f
Enable tests

Change-Id: I64c0d583fe0ebe1fb73bde9edd1b46e0bd7408c0
Merge remote-tracking branch 'upstream/master'