better error message for json parsing error