add two error handlers.