catch errors and pass them to next