Show correct error when domain deletion fails

This commit is contained in:
Johannes Zellner
2025-02-06 18:21:42 +01:00
parent 2f5c4413e1
commit 0b73633a66
+1 -1
View File
@@ -74,7 +74,7 @@ async function onRemove(domain) {
const [error] = await domainsModel.remove(domain.domain);
if (error) {
if (error.status === 409) window.pankow.notify({ text: `Domain ${domain} is still in use.`, type: 'danger', persistent: true });
if (error.status === 409) window.pankow.notify({ text: error.body.message || `Domain is still in use.`, type: 'danger', persistent: true });
return console.error(error);
}