finding out the errors messages