Add error handling to SchedTimeout patch