Hi I'm to create a simple api with itty-router, but ran into this error, anyone has any idea how to

Hi I'm to create a simple api with itty-router, but ran into this error, anyone has any idea how to fix this?

A hanging Promise was canceled. This happens when the worker runtime is waiting for a Promise from JavaScript to resolve, but has detected that the Promise cannot possibly ever resolve because all code and events related to the Promise's I/O context have already finished.

const router = Router();

router.get('/api', () => {
    return new Response('Welcome to the inspecti api', {
            headers: { 'Content-Type': 'text/plain' },
    });
});

router.all('*', () => new Response('404, not found!', { status: 404 }));

export default {
    fetch: (request: Request, env: Env, ctx: ExecutionContext) => router.handle(request, env, ctx),
} satisfies ExportedHandler<Env>;
Was this page helpful?