diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 900560d8c..24fc49315 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -227,6 +227,16 @@ Index = notice.close() return + if req.status not in [200, 304] + err = "Index refresh failed. Error #{req.statusText} (#{req.status})" + if notice + notice.setType 'warning' + notice.el.lastElementChild.textContent = err + setTimeout notice.close, $.SECOND + else + new Notice 'warning', err, 1 + return + try if req.status is 200 Index.parse JSON.parse(req.response), pageNum @@ -238,9 +248,9 @@ Index = if notice notice.setType 'error' notice.el.lastElementChild.textContent = 'Index refresh failed.' - setTimeout notice.close, 2 * $.SECOND + setTimeout notice.close, $.SECOND else - new Notice 'error', 'Index refresh failed.', 2 + new Notice 'error', 'Index refresh failed.', 1 return if notice