So basically the whole #cloudflare outage was due to code that wasn't robust enough.
They used a function that can return a certain type of object OR AN ERROR.
They assumed the returned value would always be an object of the expected type and tried to use it as such.
In PHP terms, similar to:
$items = get_items();
foreach ($items as $item) {
$item->process();
}
In #PHP we'd catch this early through static analysis & add explicit type checks everywhere.
Doesn't #Rust have this?