Separate out error handling when processing