The middleware didn't return a Response.
本頁內容尚未翻譯。
MiddlewareNoDataOrNextCalled: Make sure your middleware returns a
Responseobject, either directly or by returning theResponsefrom calling thenextfunction.
What went wrong?
Section titled What went wrong?Thrown when the middleware does not return any data or call the next function.
For example:
import {defineMiddleware} from "astro:middleware";export const onRequest = defineMiddleware((context, _) => { // doesn't return anything or call `next` context.locals.someData = false;});