컨텐츠로 이동

The middleware didn't return a response or call next.

이 컨텐츠는 아직 번역되지 않았습니다.

MiddlewareNoDataOrNextCalled: The middleware needs to either return a Response object or call the next function.

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;
});