Files
vercel/packages/cli/test/dev/fixtures/edge-function-error/api/edge-no-response.js
Sean Massa 5dc6f48e44 [cli][dev] handle no response from edge functions (#8095)
When an edge function has no response during `vc dev`, we were seeing an unhelpful error message:

> The event listener did not respond.

Now, we'll see a much more specific error message:

> Unhandled rejection: Edge Function "api/edge-no-response.ts" did not return a response.
> Error! Failed to complete request to /api/edge-no-response: Error: socket hang up
2022-07-20 20:09:29 +00:00

8 lines
137 B
JavaScript

export const config = {
runtime: 'experimental-edge',
};
export default async function edge(request, event) {
// nothing returned
}