Merge pull request #3161 from Comfy-Org/fix/issue-3128-c1
fix(ui): show the server's reason for a batch 404, not a false channel message (#3128)
This commit is contained in:
+2
-4
@@ -659,14 +659,12 @@ export async function uninstallNodes(nodeList, options = {}) {
|
||||
});
|
||||
|
||||
if (res.status != 200) {
|
||||
errorMsg = `'${nodeItem.title || nodeItem.name}': `;
|
||||
errorMsg = `'${sanitizeHTML(String(nodeItem.title || nodeItem.name))}': `;
|
||||
|
||||
if (res.status == 403) {
|
||||
errorMsg += `This action is not allowed with this security level configuration.\n`;
|
||||
} else if (res.status == 404) {
|
||||
errorMsg += `With the current security level configuration, only custom nodes from the <B>"default channel"</B> can be uninstalled.\n`;
|
||||
} else {
|
||||
errorMsg += await res.text() + '\n';
|
||||
errorMsg += sanitizeHTML(await res.text()) + '\n';
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -1467,7 +1467,7 @@ export class CustomNodesManager {
|
||||
});
|
||||
|
||||
if (res.status != 200) {
|
||||
errorMsg = `'${item.title}': `;
|
||||
errorMsg = `'${sanitizeHTML(String(item.title))}': `;
|
||||
|
||||
if(res.status == 403) {
|
||||
try {
|
||||
@@ -1480,10 +1480,8 @@ export class CustomNodesManager {
|
||||
} catch {
|
||||
errorMsg += `This action is not allowed with this security level configuration.\n`;
|
||||
}
|
||||
} else if(res.status == 404) {
|
||||
errorMsg += `With the current security level configuration, only custom nodes from the <B>"default channel"</B> can be installed.\n`;
|
||||
} else {
|
||||
errorMsg += await res.text() + '\n';
|
||||
errorMsg += sanitizeHTML(await res.text()) + '\n';
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user