تخطَّ إلى المحتوى
This is an unmaintained snapshot of the Astro v4 docs. View the latest docs.

Invalid type returned by Astro page.

هذا المحتوى غير متوفر بلغتك بعد.

Route returned a RETURNED_VALUE. Only a Response can be returned from Astro files.

Only instances of Response can be returned inside Astro files.

pages/login.astro
---
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:

ساهم

بماذا تفكّر؟

المجتمع