mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Added NoneType exception handling in settings & server modules while returning json response.
This commit is contained in:
parent
fe10994fb9
commit
52b86b6fb4
@ -238,8 +238,13 @@ class ServerNode(NodeView):
|
|||||||
success=0,
|
success=0,
|
||||||
errormsg=e.message)
|
errormsg=e.message)
|
||||||
|
|
||||||
|
try:
|
||||||
|
info = traceback.format_exc()
|
||||||
|
except Exception as e:
|
||||||
|
info = str(e)
|
||||||
|
|
||||||
return make_json_response(success=1,
|
return make_json_response(success=1,
|
||||||
info=traceback.format_exc())
|
info=info)
|
||||||
|
|
||||||
def update(self, gid, sid):
|
def update(self, gid, sid):
|
||||||
"""Update the server settings"""
|
"""Update the server settings"""
|
||||||
|
@ -75,9 +75,15 @@ def store(setting=None, value=None):
|
|||||||
success = 0
|
success = 0
|
||||||
errormsg = e.message
|
errormsg = e.message
|
||||||
|
|
||||||
|
try:
|
||||||
|
info = traceback.format_exc()
|
||||||
|
except Exception as e:
|
||||||
|
info = str(e)
|
||||||
|
|
||||||
|
|
||||||
return make_json_response(success=success,
|
return make_json_response(success=success,
|
||||||
errormsg=errormsg,
|
errormsg=errormsg,
|
||||||
info=traceback.format_exc(),
|
info=info,
|
||||||
result=request.form)
|
result=request.form)
|
||||||
|
|
||||||
@blueprint.route("/get", methods=['POST'])
|
@blueprint.route("/get", methods=['POST'])
|
||||||
@ -100,7 +106,12 @@ def get(setting=None, default=None):
|
|||||||
success = 0
|
success = 0
|
||||||
errormsg = e.message
|
errormsg = e.message
|
||||||
|
|
||||||
|
try:
|
||||||
|
info = traceback.format_exc()
|
||||||
|
except Exception as e:
|
||||||
|
info = str(e)
|
||||||
|
|
||||||
return make_json_response(success=success,
|
return make_json_response(success=success,
|
||||||
errormsg=errormsg,
|
errormsg=errormsg,
|
||||||
info=traceback.format_exc(),
|
info=info,
|
||||||
result=request.form)
|
result=request.form)
|
||||||
|
Loading…
Reference in New Issue
Block a user