Skip to content

Commit

Permalink
Update Workers Sites/Legacy Assets error message in versions commands (
Browse files Browse the repository at this point in the history
…#6390)

* update error message

* update snapshots
  • Loading branch information
RamIdeas authored Jul 31, 2024
1 parent 31aa15c commit 9f02173
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/wrangler/e2e/versions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => {
);

expect(normalize(upload.output)).toMatchInlineSnapshot(`
"X [ERROR] Legacy Assets are not supported in Gradual Deployments.
"X [ERROR] Legacy Assets does not support uploading versions through \`wrangler versions upload\`. You must use \`wrangler deploy\` instead.
🪵 Logs were written to "<LOG>""
`);
});
Expand Down Expand Up @@ -580,7 +580,7 @@ describe("versions deploy", { timeout: TIMEOUT }, () => {
const upload = await helper.run(`wrangler versions upload --x-versions`);

expect(normalize(upload.output)).toMatchInlineSnapshot(`
"X [ERROR] Workers Sites are not supported in Gradual Deployments.
"X [ERROR] Workers Sites does not support uploading versions through \`wrangler versions upload\`. You must use \`wrangler deploy\` instead.
🪵 Logs were written to "<LOG>""
`);
});
Expand Down
4 changes: 2 additions & 2 deletions packages/wrangler/src/versions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,12 @@ export async function versionsUploadHandler(

if (args.site || config.site) {
throw new UserError(
"Workers Sites are not supported in Gradual Deployments."
"Workers Sites does not support uploading versions through `wrangler versions upload`. You must use `wrangler deploy` instead."
);
}
if (args.legacyAssets || config.legacy_assets) {
throw new UserError(
"Legacy Assets are not supported in Gradual Deployments."
"Legacy Assets does not support uploading versions through `wrangler versions upload`. You must use `wrangler deploy` instead."
);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/wrangler/src/versions/secrets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ async function parseModules(
// Workers Sites is not supported
if (formData.get("__STATIC_CONTENT_MANIFEST") !== null) {
throw new UserError(
"Workers Sites is not supported for `versions secret put` today."
"Workers Sites and Legacy Assets do not support updating secrets through `wrangler versions secret put`. You must use `wrangler secret put` instead."
);
}

Expand Down

0 comments on commit 9f02173

Please sign in to comment.