Fix an issue where sequence owner is remove on sequence edit. #5810

This commit is contained in:
Aditya Toshniwal
2023-02-22 14:06:44 +05:30
committed by GitHub
parent cf28d7df32
commit 9abbd30790
4 changed files with 13 additions and 6 deletions

View File

@@ -711,12 +711,12 @@ define('pgadmin.browser.node', [
pgBrowser.removeTreeNode(i, selectNextNode);
}
return true;
}).catch(function(xhr) {
let errmsg = xhr.responseText;
}).catch(function(error) {
let errmsg = error.request?.responseText;
/* Error from the server */
if (xhr.status == 417 || xhr.status == 410 || xhr.status == 500) {
if (error.request?.status == 417 || error.request?.status == 410 || error.request?.status == 500) {
try {
let data = JSON.parse(xhr.responseText);
let data = error.response.data;
errmsg = data.info || data.errormsg;
} catch (e) {
console.warn(e.stack || e);