vercel/next.js · error

-32000

-32000

Error message

Internal server error

What it means

The turbo-trace-server's HTTP handler catches any failure while reading the request body, JSON-parsing it, or letting the MCP transport handle the request, then responds 500 with this generic JSON body; underlying error details are not forwarded to the client.

Source

Thrown at packages/next/src/cli/internal/turbo-trace-server.ts:264

      res.on('close', () => transport.close())
      await mcpServer.connect(transport)
      let body = ''
      req.setEncoding('utf8')
      await new Promise<void>((resolve, reject) => {
        req.on('data', (chunk: string) => {
          body += chunk
        })
        req.on('end', resolve)
        req.on('error', reject)
      })
      await transport.handleRequest(
        req,
        res,
        body ? JSON.parse(body) : undefined
      )
    } catch (err) {
      if (!res.headersSent) {
        res.writeHead(500, {
          'Content-Type': 'application/json; charset=utf-8',
        })
        res.end(
          JSON.stringify({
            jsonrpc: '2.0',
            error: { code: -32000, message: 'Internal server error' },
            id: null,
          })
        )
      }
    }
  })

  server.on('error', (err: NodeJS.ErrnoException) => {
    if (err.code === 'EADDRINUSE') {
      console.error(
        `Error: MCP port ${httpPort} is already in use. Use --mcp-port to specify a different port.`
      )

View on GitHub (pinned to 0eb3775416)

Solutions

  1. Check the trace server logs for the underlying error; retry the request or restart the trace server.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at packages/next/src/cli/internal/turbo-trace-server.ts:264 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19). Data as JSON: /api/errors/440826770511511a. Report an issue: GitHub.