We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 175a65e commit 9d239b7Copy full SHA for 9d239b7
1 file changed
packages/plugin-mcp/src/endpoint/index.ts
@@ -1,13 +1,13 @@
1
import { WebStandardStreamableHTTPServerTransport } from '@modelcontextprotocol/server'
2
-import { AuthenticationError, type PayloadHandler } from 'payload'
+import { APIError, type PayloadHandler } from 'payload'
3
4
import { buildMcpServer } from '../mcp/buildMcpServer.js'
5
import { getPluginConfig } from '../utils/getPluginConfig.js'
6
import { getAuthorizedMCP } from './access.js'
7
8
export const mcpEndpoint: PayloadHandler = async (req) => {
9
if (!req.url) {
10
- throw new AuthenticationError()
+ throw new APIError('Missing request URL', 400)
11
}
12
13
req.payloadAPI = 'MCP' as const
0 commit comments