diff --git a/web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSet.jsx b/web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSet.jsx index ead2943a547..08818a15c88 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSet.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSet.jsx @@ -300,7 +300,17 @@ export class ResultSetUtils { }, ()=>{ /*This is intentional (SonarQube)*/ }); - } else { + }else if (e?.response?.data.info == 'CRYPTKEY_MISSING'){ + let pgBrowser = window.pgAdmin.Browser; + pgBrowser.set_master_password('', async (passwordData)=>{ + await this.connectServer(this.queryToolCtx.params.sid, this.queryToolCtx.params.user, passwordData, async ()=>{ + await this.eventBus.fireEvent(QUERY_TOOL_EVENTS.REINIT_QT_CONNECTION, '', explainObject, macroSQL, flags.executeCursor, true); + }); + }, ()=> { + /*This is intentional (SonarQube)*/ + }); + return; + }else { this.eventBus.fireEvent(QUERY_TOOL_EVENTS.EXECUTION_END); this.eventBus.fireEvent(QUERY_TOOL_EVENTS.HANDLE_API_ERROR, e,