diff --git a/.github/workflows/check-doc-build.yml b/.github/workflows/check-doc-build.yml index 42c50f289..c7a72b263 100644 --- a/.github/workflows/check-doc-build.yml +++ b/.github/workflows/check-doc-build.yml @@ -29,6 +29,9 @@ jobs: - name: Install requirements run: pip install -r requirements.txt + - name: Install pyOpenSSL + run: pip install "pyOpenSSL>=23.*" + - name: Install sphinx run: pip install sphinx diff --git a/web/pgadmin/browser/static/js/node_view.jsx b/web/pgadmin/browser/static/js/node_view.jsx index 993966601..47dc8e41a 100644 --- a/web/pgadmin/browser/static/js/node_view.jsx +++ b/web/pgadmin/browser/static/js/node_view.jsx @@ -56,15 +56,14 @@ export function getNodeView(nodeType, treeNodeInfo, actionType, itemNodeData, fo resolve(res.data); }) .catch((err)=>{ - if(err.response){ - console.error('error resp', err.response); - } else if(err.request){ - console.error('error req', err.request); - } else if(err.message){ - console.error('error msg', err.message); - } - reject(err); - Notify.pgRespErrorNotify(err); + Notify.pgNotifier('error', err, '', function(msg) { + if (msg == 'CRYPTKEY_SET') { + return Promise.resolve(initData()); + } else if (msg == 'CRYPTKEY_NOT_SET') { + reject(gettext('The master password is not set.')); + } + reject(err); + }); }); } }); @@ -81,7 +80,14 @@ export function getNodeView(nodeType, treeNodeInfo, actionType, itemNodeData, fo resolve(res.data); onSave && onSave(res.data); }).catch((err)=>{ - reject(err); + Notify.pgNotifier('error', err, '', function(msg) { + if (msg == 'CRYPTKEY_SET') { + return Promise.resolve(onSaveClick(isNew, data)); + } else if (msg == 'CRYPTKEY_NOT_SET') { + reject(gettext('The master password is not set.')); + } + reject(err); + }); }); }); diff --git a/web/pgadmin/static/js/SchemaView/index.jsx b/web/pgadmin/static/js/SchemaView/index.jsx index adb01fc23..abbf9b896 100644 --- a/web/pgadmin/static/js/SchemaView/index.jsx +++ b/web/pgadmin/static/js/SchemaView/index.jsx @@ -595,11 +595,15 @@ function SchemaDialogView({ }); setFormReady(true); setLoaderText(''); - }).catch(()=>{ + }).catch((err)=>{ if(unmounted) { return; } setLoaderText(''); + setFormErr({ + name: 'apierror', + message: _.escape(parseApiError(err)), + }); }); /* Clear the focus timeout if unmounted */ return ()=>{ @@ -892,8 +896,9 @@ function SchemaPropertiesView({ }); setLoaderText(''); } - }).catch(()=>{ + }).catch((err)=>{ setLoaderText(''); + Notify.pgRespErrorNotify(err); }); }, []);