Salta ai contenuti
This is an unmaintained snapshot of the Astro v4 docs. View the latest docs.

The endpoint did not return a Response.

Questi contenuti non sono ancora disponibili nella tua lingua.

EndpointDidNotReturnAResponse: An endpoint must return either a Response, or a Promise that resolves with a Response.

Thrown when an endpoint does not return anything or returns an object that is not a Response object.

An endpoint must return either a Response, or a Promise that resolves with a Response. For example:

import type { APIContext } from 'astro';
export async function GET({ request, url, cookies }: APIContext): Promise<Response> {
return Response.json({
success: true,
result: 'Data from Astro Endpoint!'
})
}
Contribuisci

A cosa stai pensando?

Crea una Issue su GitHub

Il modo più rapido per segnalare un problema al nostro team.

Comunità