[RFC] plug document interface and clean up missing errors