tdb2: change API to return the error value.