throwError function.
Temporarily this still needs to be available in closure scope.