fixup error handling in views and routes