mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-09-03 20:52:57 -05:00
Fixed python exception error when user tries to download the CSV and there is a connection issue. Fixes #4858
This commit is contained in:
committed by
Akshay Joshi
parent
ed0a596286
commit
c41da41efe
@@ -1370,8 +1370,12 @@ def start_query_download_tool(trans_id):
|
||||
] = "attachment;filename={0}".format(filename)
|
||||
|
||||
return r
|
||||
except (ConnectionLost, SSHTunnelConnectionLost):
|
||||
raise
|
||||
except Exception as e:
|
||||
err_msg = gettext("Error: {0}").format(e.strerror)
|
||||
current_app.logger.error(e)
|
||||
err_msg = "Error: {0}".format(
|
||||
e.strerror if hasattr(e, 'strerror') else str(e))
|
||||
return internal_server_error(errormsg=err_msg)
|
||||
else:
|
||||
return internal_server_error(
|
||||
|
||||
Reference in New Issue
Block a user