Adding timeout handler.

This commit is contained in:
Samuel Clay 2014-11-03 19:30:05 -08:00
parent 96262a1bf5
commit 60b1f0bda1
2 changed files with 3 additions and 1 deletions

View file

@ -522,6 +522,7 @@ def load_single_feed(request, feed_id):
include_story_content = is_true(request.REQUEST.get('include_story_content', True))
message = None
user_search = None
time.sleep(3)
dupe_feed_id = None
user_profiles = []

View file

@ -104,10 +104,11 @@ NEWSBLUR.AssetModel = Backbone.Router.extend({
NEWSBLUR.log(['AJAX Error', e, e.status, textStatus, errorThrown,
!!error_callback, error_callback, $.isFunction(callback)]);
if (errorThrown == "timeout") textStatus = "NewsBlur timed out trying<br />to connect. Just try again.";
if (error_callback) {
error_callback(e, textStatus, errorThrown);
} else if ($.isFunction(callback)) {
var message = "Please create an account. Not much to do without an account.";
var message = "Please create an account. Not much<br />to do without an account.";
if (NEWSBLUR.Globals.is_authenticated) {
message = "Sorry, there was an unhandled error.";
}