mirror of
https://github.com/FlowiseAI/Flowise.git
synced 2026-10-12 02:02:17 +00:00
Enhance error message for webhook trigger configuration in executeAgentFlow function to include the configured HTTP method
This commit is contained in:
@@ -1603,9 +1603,10 @@ export const executeAgentFlow = async ({
|
||||
|
||||
if (!isRecursive) {
|
||||
if (startInputType === 'webhookTrigger' && chatType !== ChatType.WEBHOOK) {
|
||||
const configuredMethod = ((startNode?.data?.inputs?.webhookMethod as string) || 'POST').toUpperCase()
|
||||
throw new InternalFlowiseError(
|
||||
StatusCodes.BAD_REQUEST,
|
||||
`This flow is configured as a Webhook Trigger. Call POST /api/v1/webhook/${chatflowid} instead of the prediction API.`
|
||||
`This flow is configured as a Webhook Trigger. Call ${configuredMethod} /api/v1/webhook/${chatflowid} instead of the prediction API.`
|
||||
)
|
||||
}
|
||||
if (startInputType === 'scheduleInput' && chatType !== ChatType.SCHEDULED) {
|
||||
|
||||
Reference in New Issue
Block a user