From 8b7b9427bd71f48acf9dc766c976bb3f5ce5e357 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 2 Nov 2019 07:18:35 +0530 Subject: [PATCH] Better error message on AJAX call failure --- src/pyj/ajax.pyj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyj/ajax.pyj b/src/pyj/ajax.pyj index 7a8c453e5e..3a43984903 100644 --- a/src/pyj/ajax.pyj +++ b/src/pyj/ajax.pyj @@ -81,7 +81,7 @@ def ajax(path, on_complete, on_progress=None, bypass_cache=True, method='GET', q rtext = xhr.responseText or '' except: rtext = '' - xhr.error_html = str.format(_('Failed to communicate with "{}", with status: [{}] {}

{}'), xhr.request_path, xhr.status, xhr.statusText, rtext[:200]) + xhr.error_html = str.format(_('Failed to communicate with "{}", with status: [{} ({})] {}

{}'), xhr.request_path, xhr.status, event, xhr.statusText, rtext[:200]) def progress_callback(ev): if ev.lengthComputable: