rename hasError property to error