Long overdue error handling overhaul