Skip to content

Commit

Permalink
chore: fixed env check for worker
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlementlegen committed Jun 17, 2024
1 parent ecbf7ab commit 5cc14ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ export default {
headers: { "content-type": "application/json" },
});
}
if (!envConfigValidator.test(process.env)) {
if (!envConfigValidator.test(env)) {
const errorDetails: string[] = [];
for (const error of envConfigValidator.errors(process.env)) {
for (const error of envConfigValidator.errors(env)) {
errorDetails.push(`${error.path}: ${error.message}`);
}
return new Response(JSON.stringify({ error: `The environment is invalid: ${errorDetails.join("; ")}` }), {
Expand Down

0 comments on commit 5cc14ff

Please sign in to comment.