catch invalid data error