Skip to content

Commit

Permalink
ci: update error reference docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sarah11918 authored Apr 10, 2024
1 parent e1b9f3a commit 8269963
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/content/docs/en/reference/error-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ The following reference is a complete list of the errors you may encounter while
- [**FailedToFindPageMapSSR**](/en/reference/errors/failed-to-find-page-map-ssr/)<br/>Astro couldn't find the correct page to render
- [**MissingLocale**](/en/reference/errors/missing-locale/)<br/>The provided locale does not exist.
- [**MissingIndexForInternationalization**](/en/reference/errors/missing-index-for-internationalization/)<br/>Index page not found.
- [**IncorrectStrategyForI18n**](/en/reference/errors/incorrect-strategy-for-i18n/)<br/>You can't use the current function with the current strategy
- [**NoPrerenderedRoutesWithDomains**](/en/reference/errors/no-prerendered-routes-with-domains/)<br/>Prerendered routes aren't supported when internationalization domains are enabled.
- [**MissingMiddlewareForInternationalization**](/en/reference/errors/missing-middleware-for-internationalization/)<br/>Enabled manual internationalization routing without having a middleware.
- [**CantRenderPage**](/en/reference/errors/cant-render-page/)<br/>Astro can't render the route.
- [**UnhandledRejection**](/en/reference/errors/unhandled-rejection/)<br/>Unhandled rejection
- [**i18nNotEnabled**](/en/reference/errors/i18n-not-enabled/)<br/>i18n Not Enabled
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <DontEditWarning/> component.

title: You can't use the current function with the current strategy
i18nReady: true
githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
---
import DontEditWarning from '~/components/DontEditWarning.astro'

<DontEditWarning />


> **IncorrectStrategyForI18n**: The function `FUNCTION_NAME\' can only be used when the `i18n.routing.strategy` is set to `"manual"`.
## What went wrong?
Some internationalization functions are only available when Astro's own i18n routing is disabled by the configuration setting `i18n.routing: "manual"`.

**See Also:**
- [`i18n` routing](/en/guides/internationalization/#routing)


Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# 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 <DontEditWarning/> component.

title: Enabled manual internationalization routing without having a middleware.
i18nReady: true
githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
---
import DontEditWarning from '~/components/DontEditWarning.astro'

<DontEditWarning />


> **MissingMiddlewareForInternationalization**: Your configuration setting `i18n.routing: 'manual'` requires you to provide your own i18n `middleware` file.
## What went wrong?
Astro throws an error if the user enables manual routing, but it doesn't have a middleware file.



Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import DontEditWarning from '~/components/DontEditWarning.astro'
<DontEditWarning />


> **NoPrerenderedRoutesWithDomains**: Static pages aren't yet supported with multiple domains. If you wish to enable this feature, you have to disable prerendering for the page COMPONENT
> **NoPrerenderedRoutesWithDomains**: Static pages aren't yet supported with multiple domains. To enable this feature, you must disable prerendering for the page COMPONENT
## What went wrong?
Static pages aren't yet supported with i18n domains. If you wish to enable this feature, you have to disable prerendering.
Expand Down

0 comments on commit 8269963

Please sign in to comment.