Oops, bad find and replace - nice catch.  Also, the .then should be before the .catchError.