Add test and feature for invalid JSON reponse body