prototype for err_notify func