Skip to content

The middleware returned something that is not a Response object.

This content is not available in your language yet.

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

Czym chcesz się podzielić?

Create GitHub Issue

Quickest way to alert our team of a problem.

Community