-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add `session-config-missing-error.mdx` * Add `session-config-without-flag-error.mdx` * Add `session-without-supported-adapter-output-error.mdx` * Update `error-reference.mdx` * fix: indent --------- Co-authored-by: liruifengv <[email protected]>
- Loading branch information
1 parent
607a813
commit 28dbbc6
Showing
4 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/content/docs/zh-cn/reference/errors/session-config-missing-error.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
title: Session storage was enabled but not configured. | ||
i18nReady: true | ||
githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts | ||
--- | ||
|
||
> `experimental.session` 标志被设置为 `true`,但没有配置存储。请要么手动配置存储,要么使用提供会话存储(session storage)的适配器 | ||
## 哪里出了问题? | ||
当启用会话存储但却未进行配置时,抛出错误。 | ||
|
||
**另见:** | ||
- [experimental.session](/zh-cn/reference/experimental-flags/sessions/) | ||
|
13 changes: 13 additions & 0 deletions
13
src/content/docs/zh-cn/reference/errors/session-config-without-flag-error.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: Session flag not set | ||
i18nReady: true | ||
githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts | ||
--- | ||
|
||
> 在没有启用 `experimental.session` 标志的前提下提供了会话(session)配置。 | ||
## 哪里出了问题? | ||
在没有启用 `experimental.session` 标志却进行了会话存储配置时,抛出错误。 | ||
|
||
**另见:** | ||
- [experimental.session](/zh-cn/reference/experimental-flags/sessions/) |
13 changes: 13 additions & 0 deletions
13
.../docs/zh-cn/reference/errors/session-without-supported-adapter-output-error.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
title: Sessions cannot be used with an adapter that doesn't support server output. | ||
i18nReady: true | ||
githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts | ||
--- | ||
|
||
> **SessionWithoutSupportedAdapterOutputError**: 会话(session)需要一个支持服务器输出的适配器。该适配器必须在其 `buildOutput` 功能中设置为 `"server"`。 | ||
## 哪里出了问题? | ||
你的适配器必须支持服务器输出以使用会话。 | ||
|
||
**另见:** | ||
- [服务器输出适配器构建](/zh-cn/reference/adapter-reference/#构建适配器) |