electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 240c823e8bcba6496052bdb61f14024bc45fb910
parent 43892dd61a0b7d3d1b14246275f845f65c02dda7
Author: SomberNight <somber.night@protonmail.com>
Date:   Sun, 14 Jun 2020 03:41:45 +0200

crash reporter: propagate HTTP error as exception

which will then get displayed as an error, and not as if we succeeded sending...

Diffstat:
Melectrum/base_crash_reporter.py | 2+-
Melectrum/gui/qt/exception_window.py | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/electrum/base_crash_reporter.py b/electrum/base_crash_reporter.py @@ -75,7 +75,7 @@ class BaseCrashReporter(Logger): async def do_post(self, proxy, url, data): async with make_aiohttp_session(proxy) as session: - async with session.post(url, data=data) as resp: + async with session.post(url, data=data, raise_for_status=True) as resp: return await resp.text() def get_traceback_info(self): diff --git a/electrum/gui/qt/exception_window.py b/electrum/gui/qt/exception_window.py @@ -117,7 +117,7 @@ class Exception_Window(BaseCrashReporter, QWidget, MessageBoxMixin, Logger): self.logger.error('There was a problem with the automatic reporting', exc_info=exc_info) self.show_critical(parent=self, msg=(_('There was a problem with the automatic reporting:') + '<br/>' + - repr(e)[:120] + '<br/>' + + repr(e)[:120] + '<br/><br/>' + _("Please report this issue manually") + f' <a href="{constants.GIT_REPO_ISSUES_URL}">on GitHub</a>.'), rich_text=True)