Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.11 KB

File metadata and controls

35 lines (26 loc) · 1.11 KB
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.

What went wrong?

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: