qgis-plugin icon indicating copy to clipboard operation
qgis-plugin copied to clipboard

Crash when there are server problems

Open jozef-budac opened this issue 2 years ago • 0 comments

When our server is not responsible, plugin crashes with unhandled exception

Screenshot at 2022-06-07 23-12-36

Traceback (most recent call last):

  File "/home/shockwave/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Mergin/mergin/client.py", line 188, in _do_request
    return self.opener.open(request)

  File "/usr/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)

  File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(

  File "/usr/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)

  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)

  File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)

urllib.error.HTTPError: HTTP Error 504: GATEWAY_TIMEOUT


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/home/shockwave/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Mergin/sync_dialog.py", line 94, in download_start_internal
    self.job = download_project_async(self.mergin_client, self.project_name, self.target_dir)

  File "/home/shockwave/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Mergin/mergin/client_pull.py", line 125, in download_project_async
    latest_proj_info = mc.project_info(project_path)

  File "/home/shockwave/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Mergin/mergin/client.py", line 474, in project_info
    resp = self.get("/v1/project/{}".format(project_path), params)

  File "/home/shockwave/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Mergin/mergin/client.py", line 203, in get
    return self._do_request(request)

  File "/home/shockwave/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Mergin/mergin/client.py", line 178, in wrapper
    return f(self, *args)

  File "/home/shockwave/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Mergin/mergin/client.py", line 193, in _do_request
    raise ClientError(e.read().decode("utf-8"))

Mergin.mergin.common.ClientError

jozef-budac avatar Jun 07 '22 21:06 jozef-budac