change API syntax for ErrorHandler