stage error handling