yeoman/yo — pull request #54 by flea89 (2013-07-06 11:36:37+00:00)
Title: Fix JSON.parse() error in _findAllNpmGenerators related to issue  #49

This is the fix related to the issue #49. If yo is unable to reach the registry and redirected to another page ( which is not a valid JSON), the Error "A problem occurred contacting the registry.\n Unable to parse response: not valid JSON." is thrown.
Hoping this could help.