throw exception when json_decode fails