File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -1038,7 +1038,7 @@ export async function queueWebhookExecution(
10381038 }
10391039 }
10401040
1041- const headers = Object . fromEntries ( request . headers . entries ( ) )
1041+ const { 'x-sim-idempotency-key' : _ , ... headers } = Object . fromEntries ( request . headers . entries ( ) )
10421042
10431043 // For Microsoft Teams Graph notifications, extract unique identifiers for idempotency
10441044 if (
@@ -1216,7 +1216,8 @@ export async function queueWebhookExecution(
12161216 }
12171217
12181218 if ( foundWebhook . provider === 'generic' && providerConfig . responseMode === 'custom' ) {
1219- const statusCode = Number ( providerConfig . responseStatusCode ) || 200
1219+ const rawCode = Number ( providerConfig . responseStatusCode ) || 200
1220+ const statusCode = rawCode >= 100 && rawCode <= 599 ? rawCode : 200
12201221 const responseBody = ( providerConfig . responseBody as string | undefined ) ?. trim ( )
12211222
12221223 if ( ! responseBody ) {
Original file line number Diff line number Diff line change @@ -433,7 +433,7 @@ describe('hasWorkflowChanged', () => {
433433 expect ( hasWorkflowChanged ( state1 , state2 ) ) . toBe ( true )
434434 } )
435435
436- it . concurrent ( 'should detect subBlock type changes' , ( ) => {
436+ it . concurrent ( 'should ignore subBlock type changes' , ( ) => {
437437 const state1 = createWorkflowState ( {
438438 blocks : {
439439 block1 : createBlock ( 'block1' , {
@@ -448,7 +448,7 @@ describe('hasWorkflowChanged', () => {
448448 } ) ,
449449 } ,
450450 } )
451- expect ( hasWorkflowChanged ( state1 , state2 ) ) . toBe ( true )
451+ expect ( hasWorkflowChanged ( state1 , state2 ) ) . toBe ( false )
452452 } )
453453
454454 it . concurrent ( 'should handle null/undefined subBlock values consistently' , ( ) => {
Original file line number Diff line number Diff line change @@ -67,14 +67,16 @@ export const genericWebhookTrigger: TriggerConfig = {
6767 { label : 'Default' , id : 'default' } ,
6868 { label : 'Custom' , id : 'custom' } ,
6969 ] ,
70+ defaultValue : 'default' ,
7071 mode : 'trigger' ,
7172 } ,
7273 {
7374 id : 'responseStatusCode' ,
7475 title : 'Response Status Code' ,
7576 type : 'short-input' ,
76- placeholder : '200' ,
77- description : 'HTTP status code to return to the webhook caller.' ,
77+ placeholder : '200 (default)' ,
78+ description :
79+ 'HTTP status code (100–599) to return to the webhook caller. Defaults to 200 if empty or invalid.' ,
7880 required : false ,
7981 mode : 'trigger' ,
8082 condition : { field : 'responseMode' , value : 'custom' } ,
You can’t perform that action at this time.
0 commit comments