The endpoint did not return a Response.
EndpointDidNotReturnAResponse: An endpoint must return either a
Response, or aPromisethat resolves with aResponse.
무엇이 잘못되었나요?
엔드포인트가 아무것도 반환하지 않거나 Response가 아닌 객체를 반환할 때 발생합니다.
엔드포인트는 Response 또는 Response로 resolve되는 Promise를 반환해야 합니다. 예를 들어:
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!'
})
}
Error Reference