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