passing correct error message