Simplify error handling in fetch