Fix issues more scenarios related to crypt key missing on backend server restart. #8065

This commit is contained in:
Yogesh Mahajan 2024-11-29 12:05:46 +05:30 committed by GitHub
parent fac1857579
commit 190574b3af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,