Skip to content

Commit 190574b

Browse files
Fix issues more scenarios related to crypt key missing on backend server restart. #8065
1 parent fac1857 commit 190574b

File tree

1 file changed

+11
-1
lines changed
  • web/pgadmin/tools/sqleditor/static/js/components/sections

1 file changed

+11
-1
lines changed

web/pgadmin/tools/sqleditor/static/js/components/sections/ResultSet.jsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,17 @@ export class ResultSetUtils {
300300
}, ()=>{
301301
/*This is intentional (SonarQube)*/
302302
});
303-
} else {
303+
}else if (e?.response?.data.info == 'CRYPTKEY_MISSING'){
304+
let pgBrowser = window.pgAdmin.Browser;
305+
pgBrowser.set_master_password('', async (passwordData)=>{
306+
await this.connectServer(this.queryToolCtx.params.sid, this.queryToolCtx.params.user, passwordData, async ()=>{
307+
await this.eventBus.fireEvent(QUERY_TOOL_EVENTS.REINIT_QT_CONNECTION, '', explainObject, macroSQL, flags.executeCursor, true);
308+
});
309+
}, ()=> {
310+
/*This is intentional (SonarQube)*/
311+
});
312+
return;
313+
}else {
304314
this.eventBus.fireEvent(QUERY_TOOL_EVENTS.EXECUTION_END);
305315
this.eventBus.fireEvent(QUERY_TOOL_EVENTS.HANDLE_API_ERROR,
306316
e,

0 commit comments

Comments
 (0)