process on error handler