Check for error message in the json before use it as a record