Use ni_error

Signed-off-by: Olaf Hering <olaf@aepfle.de>