This fix is a follow up to PR 38407 to use assert.Error and assert.NilError when appropriate Signed-off-by: Yong Tang <yong.tang.github@outlook.com>