Log variables error

This commit is contained in:
Vins 2023-07-25 10:20:01 +02:00
parent 18497903a3
commit df176847c0

View File

@ -94,11 +94,11 @@ export class BackendVariables {
try {
await validateOrReject(this, validationOptions);
} catch (error) {
} catch (error: any) {
if (process.env["NODE_ENV"] === "development") {
throw error;
}
throw new Error("Some env variables are required!");
throw new Error("Some env variables are required!", error);
}
return this;
}