check status first to propagate error.