Skip to content

Commit

Permalink
chore: restore error and deprecate it (#11800)
Browse files Browse the repository at this point in the history
* chore: restore error and deprecate it

* change deprecation version

* Update packages/astro/src/core/errors/errors-data.ts
  • Loading branch information
ematipico authored Aug 21, 2024
1 parent 5ea13a8 commit 6814ff0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/astro/src/core/errors/errors-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1664,6 +1664,22 @@ export const ActionsWithoutServerOutputError = {
hint: 'Learn about on-demand rendering: https://docs.astro.build/en/basics/rendering-modes/#on-demand-rendered',
} satisfies ErrorData;

/**
* @docs
* @see
* - [Actions RFC](https://github.com/withastro/roadmap/blob/actions/proposals/0046-actions.md)
* @description
* Action was called from a form using a GET request, but only POST requests are supported. This often occurs if `method="POST"` is missing on the form.
* @deprecated Deprecated since version 4.13.2.
*/
export const ActionsUsedWithForGetError = {
name: 'ActionsUsedWithForGetError',
title: 'An invalid Action query string was passed by a form.',
message: (actionName: string) =>
`Action ${actionName} was called from a form using a GET request, but only POST requests are supported. This often occurs if \`method="POST"\` is missing on the form.`,
hint: 'Actions are experimental. Visit the RFC for usage instructions: https://github.com/withastro/roadmap/blob/actions/proposals/0046-actions.md',
} satisfies ErrorData;

/**
* @docs
* @see
Expand Down

0 comments on commit 6814ff0

Please sign in to comment.