From 3938df05000ef351ce90823ca3e3a834951b79ac Mon Sep 17 00:00:00 2001 From: sarah11918 Date: Tue, 27 Aug 2024 10:19:22 +0000 Subject: [PATCH] ci: update error reference docs --- .../docs/en/reference/error-reference.mdx | 1 + .../actions-returned-invalid-data-error.mdx | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 src/content/docs/en/reference/errors/actions-returned-invalid-data-error.mdx diff --git a/src/content/docs/en/reference/error-reference.mdx b/src/content/docs/en/reference/error-reference.mdx index f0aab46987572..d3aa641eb7585 100644 --- a/src/content/docs/en/reference/error-reference.mdx +++ b/src/content/docs/en/reference/error-reference.mdx @@ -128,5 +128,6 @@ The following reference is a complete list of the errors you may encounter while - [**ActionsWithoutServerOutputError**](/en/reference/errors/actions-without-server-output-error/)
Actions must be used with server output. - [**ActionsUsedWithForGetError**](/en/reference/errors/actions-used-with-for-get-error/)
An invalid Action query string was passed by a form. +- [**ActionsReturnedInvalidDataError**](/en/reference/errors/actions-returned-invalid-data-error/)
Action handler returned invalid data. - [**ActionQueryStringInvalidError**](/en/reference/errors/action-query-string-invalid-error/)
An invalid Action query string was passed by a form. - [**ActionCalledFromServerError**](/en/reference/errors/action-called-from-server-error/)
Action unexpected called from the server. diff --git a/src/content/docs/en/reference/errors/actions-returned-invalid-data-error.mdx b/src/content/docs/en/reference/errors/actions-returned-invalid-data-error.mdx new file mode 100644 index 0000000000000..f763a2fcf0dd1 --- /dev/null +++ b/src/content/docs/en/reference/errors/actions-returned-invalid-data-error.mdx @@ -0,0 +1,24 @@ +--- +# NOTE: This file is auto-generated from 'scripts/error-docgen.mjs' +# Do not make edits to it directly, they will be overwritten. +# Instead, change this file: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts +# Translators, please remove this note and the component. + +title: Action handler returned invalid data. +i18nReady: true +githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts +--- +import DontEditWarning from '~/components/DontEditWarning.astro' + + + + +> **ActionsReturnedInvalidDataError**: Action handler returned invalid data. Handlers should return serializable data types like objects, arrays, strings, and numbers. Parse error: ERROR + +## What went wrong? +Action handler returned invalid data. Handlers should return serializable data types, and cannot return a Response object. + +**See Also:** +- [Actions RFC](https://github.com/withastro/roadmap/blob/actions/proposals/0046-actions.md) + +