Add error handling for pycode + interval refresh

Summary: {F11476}

Reviewers: marcua

Reviewed By: marcua

Differential Revision: http://phabricator.locu.com/D5785