fix: incorrect error reported to callback