diff --git a/src/commands/cwg_create.ts b/src/commands/cwg_create.ts index 2d8937e..ce53fa5 100644 --- a/src/commands/cwg_create.ts +++ b/src/commands/cwg_create.ts @@ -182,7 +182,7 @@ export default class CWG_Create extends Command { } catch (error) { const tasks = [fs.unlink(`/etc/nginx/sites-enabled/${domain}`), fs.unlink(`/etc/nginx/sites-available/${domain}`), this.client.db.Domain.deleteMany({ domain })]; await Promise.allSettled(tasks); - throw error; + return Promise.reject(error); } }