chore: restore error and deprecate it (#11800)

* chore: restore error and deprecate it

* change deprecation version

* Update packages/astro/src/core/errors/errors-data.ts
This commit is contained in:
Emanuele Stoppa 2024-08-21 10:19:21 +01:00 committed by GitHub
parent 5ea13a8696
commit 6814ff07f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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