Skip to content

Commit

Permalink
Throw error if required values are undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
rudokemper committed Feb 1, 2024
1 parent f069e48 commit 272696c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/azure_queue_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ const processQueueMessages = async () => {
outputFilename = "output",
} = messageData;

// Check if style, maxZoom, or bounds are undefined
if (style === undefined) {
throw new Error("Style must be provided.");
}
if (maxZoom === undefined) {
throw new Error("Max zoom must be provided.");
}
if (bounds === undefined) {
throw new Error("Bounds must be provided.");
}

const boundsArray = bounds.split(",").map(Number);
const outputDir = "/maps";

Expand Down

0 comments on commit 272696c

Please sign in to comment.