When I was younger I used to ride no matter what, but these days if I'm not too well I usually rest instead and give it a break.
Sometimes it can do you good, blow the cobwebs away so to speak, and you can come back feeling a bit better but I've also had times when I've been on the verge of collapsing when I've got back, because instead of pacing myself and making allowances for the fact I'm not well, I've tried to power through and ride as normal.