Returns error to allow error handling when chaining tasks