Skip to content

Commit

Permalink
change UserError to AssertionError
Browse files Browse the repository at this point in the history
  • Loading branch information
RamIdeas committed Mar 12, 2024
1 parent abc57e3 commit 53c3adf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/wrangler/src/versions/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,7 @@ ${ZERO_WIDTH_SPACE} Message: ${version.message ?? BLANK_INPUT}

const versions = versionIds?.map((versionId, i) => {
const version = versionCache.get(versionId);

// shouldn't be possible, but better a UserError than an assertion error
if (version === undefined) throw new UserError("Invalid Version ID");
assert(version);

return `${grayBar}
${leftT} ${white(` Worker Version ${i + 1}: `, version.id)}
Expand Down

0 comments on commit 53c3adf

Please sign in to comment.