Fixes #5866: ncf API hooks don't always fail on errors

http://www.rudder-project.org/redmine/issues/5866