@@ -108,7 +108,6 @@ describe("workflow client", () => {
108108 async ( ) => {
109109 const { workflowRunId } = await liveClient . trigger ( {
110110 url : "http://requestcatcher.com" ,
111- useFailureFunction : true ,
112111 } ) ;
113112
114113 const cancel = await liveClient . cancel ( {
@@ -244,6 +243,18 @@ describe("workflow client", () => {
244243 "upstash-telemetry-runtime" : expect . stringMatching ( / b u n @ / ) ,
245244 "upstash-telemetry-sdk" : expect . stringContaining ( "@upstash/workflow" ) ,
246245 "upstash-workflow-sdk-version" : "1" ,
246+ "upstash-failure-callback-forward-upstash-label" : "test-label" ,
247+ "upstash-failure-callback" : "https://requestcatcher.com/api" ,
248+ "upstash-failure-callback-feature-set" : "LazyFetch,InitialBody,WF_DetectTrigger" ,
249+ "upstash-failure-callback-forward-upstash-workflow-failure-callback" : "true" ,
250+ "upstash-failure-callback-forward-upstash-workflow-is-failure" : "true" ,
251+ "upstash-failure-callback-forward-user-header" : "user-header-value" ,
252+ "upstash-failure-callback-retries" : "15" ,
253+ "upstash-failure-callback-retry-delay" : "1000" ,
254+ "upstash-failure-callback-workflow-calltype" : "failureCall" ,
255+ "upstash-failure-callback-workflow-init" : "false" ,
256+ "upstash-failure-callback-workflow-runid" : `wfr_${ myWorkflowRunId } ` ,
257+ "upstash-failure-callback-workflow-url" : "https://requestcatcher.com/api" ,
247258 } ,
248259 body,
249260 } ,
@@ -277,7 +288,6 @@ describe("workflow client", () => {
277288 retries : 15 ,
278289 retryDelay : "2000" ,
279290 notBefore : new Date ( "2100-01-01T00:00:00Z" ) . getTime ( ) / 1000 ,
280- useFailureFunction : true ,
281291 } ,
282292 ] ) ;
283293 expect ( result ) . toEqual ( [
@@ -312,6 +322,17 @@ describe("workflow client", () => {
312322 "upstash-telemetry-runtime" : expect . stringMatching ( / b u n @ / ) ,
313323 "upstash-telemetry-sdk" : expect . stringContaining ( "@upstash/workflow" ) ,
314324 "upstash-workflow-sdk-version" : "1" ,
325+ "upstash-failure-callback" : "https://requestcatcher.com/api" ,
326+ "upstash-failure-callback-feature-set" : "LazyFetch,InitialBody,WF_DetectTrigger" ,
327+ "upstash-failure-callback-forward-upstash-workflow-failure-callback" : "true" ,
328+ "upstash-failure-callback-forward-upstash-workflow-is-failure" : "true" ,
329+ "upstash-failure-callback-forward-user-header" : "user-header-value" ,
330+ "upstash-failure-callback-retries" : "15" ,
331+ "upstash-failure-callback-retry-delay" : "1000" ,
332+ "upstash-failure-callback-workflow-calltype" : "failureCall" ,
333+ "upstash-failure-callback-workflow-init" : "false" ,
334+ "upstash-failure-callback-workflow-runid" : `wfr_${ myWorkflowRunId } ` ,
335+ "upstash-failure-callback-workflow-url" : "https://requestcatcher.com/api" ,
315336 } ,
316337 body,
317338 } ,
0 commit comments