Pipeline for handling errors