Improve error message consistency.
This commit is contained in:
parent
1eab048cad
commit
8ba434151c
@ -50,8 +50,8 @@ Redirect =
|
||||
urls.push url if url
|
||||
|
||||
load = (i) -> ->
|
||||
fail = (action, msg) -> new Notice 'warning', "Error #{action} archive data from #{urls[i]}\n#{msg}", 20
|
||||
return fail 'fetching', (if @status then "#{@status} #{@statusText}" else 'Connection Error') unless @status is 200
|
||||
fail = (action, msg) -> new Notice 'warning', "Error #{action} archive data from\n#{urls[i]}\n#{msg}", 20
|
||||
return fail 'fetching', (if @status then "Error #{@statusText} (#{@status})" else 'Connection Error') unless @status is 200
|
||||
try
|
||||
response = JSON.parse @response
|
||||
catch err
|
||||
|
||||
@ -162,7 +162,7 @@ ThreadUpdater =
|
||||
ThreadUpdater.set 'status', ''
|
||||
ThreadUpdater.setInterval()
|
||||
unless req.status
|
||||
ThreadUpdater.set 'status', 'Connection Failed', 'warning'
|
||||
ThreadUpdater.set 'status', 'Connection Error', 'warning'
|
||||
else if req.status isnt 304
|
||||
ThreadUpdater.set 'status', "#{req.statusText} (#{req.status})", 'warning'
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user