Ensure all errors can be converted to view objects by errorHandler middleware