proof of concept here https://github.com/NewGraphEnvironment/dff-2022/blob/master/scripts/qgis/mergin/py_client_error.Rmd