Feat: Display error messages from intermediate nodes of the webhook. #10427 (#11954)

### What problem does this PR solve?

Feat: Remove HMAC from the webhook #10427

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-12-19 12:56:56 +08:00
committed by GitHub
parent 6cd1824a77
commit 4cbe470089
27 changed files with 737 additions and 359 deletions

View File

@ -34,6 +34,7 @@ import {
NodeHandleId,
Operator,
TypesWithArray,
WebhookSecurityAuthType,
} from './constant';
import { BeginFormSchemaType } from './form/begin-form/schema';
import { DataOperationsFormSchemaType } from './form/data-operations-form';
@ -353,13 +354,20 @@ function transformRequestSchemaToJsonschema(
function transformBeginParams(params: BeginFormSchemaType) {
if (params.mode === AgentDialogueMode.Webhook) {
const nextSecurity: Record<string, any> = {
...params.security,
ip_whitelist: params.security?.ip_whitelist.map((x) => x.value),
};
if (params.security?.auth_type === WebhookSecurityAuthType.Jwt) {
nextSecurity.jwt = {
...nextSecurity.jwt,
required_claims: nextSecurity.jwt?.required_claims.map((x) => x.value),
};
}
return {
...params,
schema: transformRequestSchemaToJsonschema(params.schema),
security: {
...params.security,
ip_whitelist: params.security?.ip_whitelist.map((x) => x.value),
},
security: nextSecurity,
};
}