MCPcopy Create free account
hub / github.com/PSPDFKit/nutrient-document-engine-mcp-server / handleSessionRequest

Function handleSessionRequest

src/index.ts:271–280  ·  view source on GitHub ↗
(req: express.Request, res: express.Response)

Source from the content-addressed store, hash-verified

269 message: 'Internal server error',
270 },
271 id: null,
272 });
273 }
274 }
275 });
276
277 // Reusable handler for GET and DELETE requests
278 const handleSessionRequest = async (req: express.Request, res: express.Response) => {
279 const sessionId = req.headers['mcp-session-id'] as string | undefined;
280 if (!sessionId || !transports[sessionId]) {
281 res.status(400).send('Invalid or missing session ID');
282 return;
283 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected