Trying to refactor a feed plugin to fallback on cache if source is unavailable (ex: for maintenance).
fetch_feed($url); which affords more flexibility in terms of cache. But unsure of how to structure the fallback.
Sounds like you are looking at it from a very low layer POV.
fetch_feed provides caching so you will not need to wait for a response on possibly every page load. Therefor, as long as there is a cache you are unlikely to even want a message to be sent and obviously you are not handling any actual result. It is unlikely that you will want to hurt your server with a faster refresh rate just to be able to properly detect the conditions on the other side.
What you should do is to handle the situation of not getting a reply, which is probably equal to empty feed, to supply the defaults you want.