Zum Inhalt springen

The middleware returned something that is not a Response object.

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

MiddlewareNotAResponse: Any data returned from middleware must be a valid Response object.

Thrown in development mode when middleware returns something that is not a Response object.

For example:

import {defineMiddleware} from "astro:middleware";
export const onRequest = defineMiddleware(() => {
return "string"
});
Wirke mit

Worum geht es?

Community