Edit variables error

This commit is contained in:
Vins 2023-07-25 10:50:09 +02:00
parent df176847c0
commit 4668fcb88f

View File

@ -90,6 +90,8 @@ export class BackendVariables {
this.ENV = process.env["ENV"]!;
}
public async validate(groups?: string[]) {
console.log(this);
const validationOptions = groups ? { groups } : undefined;
try {
@ -98,7 +100,9 @@ export class BackendVariables {
if (process.env["NODE_ENV"] === "development") {
throw error;
}
throw new Error("Some env variables are required!", error);
console.error(error);
console.error(this);
throw new Error("Some env variables are required!");
}
return this;
}