Check `status` and throw exceptions if necessary.