Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/olive-pans-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix three error names that did not match their documented reference. `MissingLocale`, `MissingIndexForInternationalization` and `NoManifestAvailable` reported names ending in `Error` in the dev overlay, while their error reference pages are published under the unsuffixed names, so the name shown to users could not be found in the docs.
6 changes: 3 additions & 3 deletions packages/astro/src/core/errors/errors-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ export const FailedToFindPageMapSSR = {
* Astro can't find the requested locale. All supported locales must be configured in [`i18n.locales`](https://docs.astro.build/en/reference/configuration-reference/#i18nlocales) and have corresponding directories within `src/pages/`.
*/
export const MissingLocale = {
name: 'MissingLocaleError',
name: 'MissingLocale',
title: 'The provided locale does not exist.',
message: (locale: string) =>
`The locale/path \`${locale}\` does not exist in the configured \`i18n.locales\`.`,
Expand All @@ -1203,7 +1203,7 @@ export const MissingLocale = {
* - [`i18n.routing` Configuration Reference](https://docs.astro.build/en/reference/configuration-reference/#i18nrouting)
*/
export const MissingIndexForInternationalization = {
name: 'MissingIndexForInternationalizationError',
name: 'MissingIndexForInternationalization',
title: 'Index page not found.',
message: (defaultLocale: string) =>
`Could not find index page. A root index page is required in order to create a redirect to the index URL of the default locale. (\`/${defaultLocale}\`)`,
Expand Down Expand Up @@ -1567,7 +1567,7 @@ export const LoggerConfigurationNotSerializable = {
* `new FetchState(request)` was called outside of an Astro server, so no manifest is available.
*/
export const NoManifestAvailable = {
name: 'NoManifestAvailableError',
name: 'NoManifestAvailable',
title: 'No manifest available.',
message:
'`new FetchState(request)` was called outside of an Astro server, so no manifest is available.',
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/units/manifest/ambient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('ambient manifest', () => {
() => getAmbientManifest(),
(error: unknown) => {
assert.ok(error instanceof Error);
assert.equal(error.name, 'NoManifestAvailableError');
assert.equal(error.name, 'NoManifestAvailable');
assert.match(error.message, /outside of an Astro server/);
return true;
},
Expand Down
Loading