diff --git a/src/pyj/ajax.pyj b/src/pyj/ajax.pyj index 341ce5c95b..7a8c453e5e 100644 --- a/src/pyj/ajax.pyj +++ b/src/pyj/ajax.pyj @@ -77,7 +77,10 @@ def ajax(path, on_complete, on_progress=None, bypass_cache=True, method='GET', q elif event is 'abort': xhr.error_html = str.format(_('Failed to communicate with "{}", aborted'), xhr.request_path) else: - rtext = xhr.responseText or '' + try: + 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]) def progress_callback(ev):