Improve error message consistency.

This commit is contained in:
ccd0 2016-05-17 21:59:11 -07:00
parent 1eab048cad
commit 8ba434151c
2 changed files with 3 additions and 3 deletions

View File

@ -50,8 +50,8 @@ Redirect =
urls.push url if url urls.push url if url
load = (i) -> -> load = (i) -> ->
fail = (action, msg) -> new Notice 'warning', "Error #{action} archive data from #{urls[i]}\n#{msg}", 20 fail = (action, msg) -> new Notice 'warning', "Error #{action} archive data from\n#{urls[i]}\n#{msg}", 20
return fail 'fetching', (if @status then "#{@status} #{@statusText}" else 'Connection Error') unless @status is 200 return fail 'fetching', (if @status then "Error #{@statusText} (#{@status})" else 'Connection Error') unless @status is 200
try try
response = JSON.parse @response response = JSON.parse @response
catch err catch err

View File

@ -162,7 +162,7 @@ ThreadUpdater =
ThreadUpdater.set 'status', '' ThreadUpdater.set 'status', ''
ThreadUpdater.setInterval() ThreadUpdater.setInterval()
unless req.status unless req.status
ThreadUpdater.set 'status', 'Connection Failed', 'warning' ThreadUpdater.set 'status', 'Connection Error', 'warning'
else if req.status isnt 304 else if req.status isnt 304
ThreadUpdater.set 'status', "#{req.statusText} (#{req.status})", 'warning' ThreadUpdater.set 'status', "#{req.statusText} (#{req.status})", 'warning'