MCPcopy
hub / github.com/alpic-ai/skybridge / next

Function next

packages/core/src/server/middleware.ts:281–289  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

279 let nextCalled = false;
280
281 const next = (): Promise<unknown> => {
282 if (nextCalled) {
283 throw new Error(
284 `next() called multiple times in middleware for "${method}"`,
285 );
286 }
287 nextCalled = true;
288 return executeLayer();
289 };
290
291 return Promise.resolve(entry.handler(mcpRequest, extra, next));
292 };

Callers 15

middleware.test.tsFile · 0.70
handlerFunction · 0.70
mcpMiddlewareFunction · 0.70
optionalBearerAuthFunction · 0.70
express.test.tsFile · 0.70
mwFunction · 0.70
mwAFunction · 0.70
mwBFunction · 0.70
apiMwFunction · 0.70
throwingApiRouteFunction · 0.70

Calls 1

executeLayerFunction · 0.85

Tested by 5

mwFunction · 0.56
mwAFunction · 0.56
mwBFunction · 0.56
apiMwFunction · 0.56
throwingApiRouteFunction · 0.56