Show correct error when domain deletion fails
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user