Exception handling for 404 (from michaelcostello)