| title | Invalid type returned by Astro page. |
|---|---|
| i18nReady | true |
| githubURL | https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts |
import DontEditWarning from '~/components/DontEditWarning.astro'
Route returned a
RETURNED_VALUE. Only a Response can be returned from Astro files.
Only instances of Response can be returned inside Astro files.
---
return new Response(null, {
status: 404,
statusText: 'Not found'
});
// Alternatively, for redirects, `Astro.redirect()` also returns an instance of `Response`
return Astro.redirect('/login');
---See Also: