[{"data":1,"prerenderedAt":4487},["ShallowReactive",2],{"content-query-35qPMuPMJ5":3,"content-query-yP1cWMns5L":4286,"content-query-W4RtfFQaoh":4290,"content-query-eJ9XWy0CGH":4315,"content-query-M5aWdXgQKx":4328,"content-query-UP87PRcOMw":4335,"content-query-7VgBfxLOWV":4339,"content-query-Z6fTkbgt1D":4361,"content-query-9giMhwHrGj":4371,"content-query-j8GGVgf9na":4378,"content-query-G03kJtQzJS":4391,"content-query-1mvwAKmUBq":4410,"content-query-No6iPTj4EO":4435,"content-query-zRSmsuVl55":4445,"content-query-MsdmgXewTK":4449,"content-query-BMhIInEJl2":4456},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"intro":10,"type":11,"section":5,"level":12,"layout":13,"tags":14,"body":17,"_type":4279,"_id":4280,"_source":4281,"_file":4282,"_stem":4283,"_extension":4284,"sitemap":4285},"/docs/webhooks/functions/response-functions","functions",false,"","Response (post-delivery) functions","Run a JavaScript or Lua function after a webhook is delivered to alert on failures, push metrics, or flag bad responses.","Response functions run after a webhook has been delivered, once the destination's response (or the final delivery error) is known. Use them to alert on failures, push metrics, or flag a bad response.","example","intermediate","doc",[15,16],"Functions","Webhook Forwarding",{"type":18,"children":19,"toc":4268},"root",[20,43,70,75,137,176,183,195,204,209,286,297,305,310,385,420,434,469,620,688,707,713,734,1831,1837,1858,3103,3108,3134,3139,3242,3247,3274,3988,3994,4006,4092,4111,4124,4130,4192,4198,4262],{"type":21,"tag":22,"props":23,"children":24},"element","p",{},[25,28,34,36,41],{"type":26,"value":27},"text","A ",{"type":21,"tag":29,"props":30,"children":31},"strong",{},[32],{"type":26,"value":33},"response function",{"type":26,"value":35}," is a JavaScript or Lua function attached to an output that runs ",{"type":21,"tag":29,"props":37,"children":38},{},[39],{"type":26,"value":40},"after",{"type":26,"value":42}," a webhook has been delivered — once the destination's response, or the final delivery error after all retries are exhausted, is known.",{"type":21,"tag":22,"props":44,"children":45},{},[46,48,53,55,61,63,68],{"type":26,"value":47},"It is the counterpart to the regular ",{"type":21,"tag":29,"props":49,"children":50},{},[51],{"type":26,"value":52},"request function",{"type":26,"value":54}," (also called a transform function), which runs ",{"type":21,"tag":56,"props":57,"children":58},"em",{},[59],{"type":26,"value":60},"before",{"type":26,"value":62}," delivery and reshapes the outgoing request. A response function runs at the other end of the pipeline, on the delivery ",{"type":21,"tag":29,"props":64,"children":65},{},[66],{"type":26,"value":67},"outcome",{"type":26,"value":69},".",{"type":21,"tag":22,"props":71,"children":72},{},[73],{"type":26,"value":74},"Use it to add custom logic when a delivery succeeds or fails:",{"type":21,"tag":76,"props":77,"children":78},"ul",{},[79,90,117,127],{"type":21,"tag":80,"props":81,"children":82},"li",{},[83,88],{"type":21,"tag":29,"props":84,"children":85},{},[86],{"type":26,"value":87},"Alert on failures",{"type":26,"value":89}," — send a Slack message or email when a delivery returns a 5xx, times out, hits a connection error, or returns an unexpected status.",{"type":21,"tag":80,"props":91,"children":92},{},[93,98,100,107,109,115],{"type":21,"tag":29,"props":94,"children":95},{},[96],{"type":26,"value":97},"Catch silent failures",{"type":26,"value":99}," — treat a ",{"type":21,"tag":101,"props":102,"children":104},"code",{"className":103},[],[105],{"type":26,"value":106},"200",{"type":26,"value":108}," with an empty body (or a ",{"type":21,"tag":101,"props":110,"children":112},{"className":111},[],[113],{"type":26,"value":114},"{\"ok\": false}",{"type":26,"value":116}," payload) as a failure.",{"type":21,"tag":80,"props":118,"children":119},{},[120,125],{"type":21,"tag":29,"props":121,"children":122},{},[123],{"type":26,"value":124},"Push metrics or open tickets",{"type":26,"value":126}," — react to the outcome of every delivery.",{"type":21,"tag":80,"props":128,"children":129},{},[130,135],{"type":21,"tag":29,"props":131,"children":132},{},[133],{"type":26,"value":134},"Flag the recorded response",{"type":26,"value":136}," — override the status/body/headers saved to the webhook log so the dashboard and failure alerts reflect what really happened.",{"type":21,"tag":138,"props":139,"children":140},"blockquote",{},[141],{"type":21,"tag":22,"props":142,"children":143},{},[144,146,151,153,158,160,165,167,174],{"type":26,"value":145},"A response function ",{"type":21,"tag":29,"props":147,"children":148},{},[149],{"type":26,"value":150},"cannot change what was already returned to the sender",{"type":26,"value":152}," — the webhook is already delivered. It ",{"type":21,"tag":56,"props":154,"children":155},{},[156],{"type":26,"value":157},"can",{"type":26,"value":159}," rewrite the response that gets ",{"type":21,"tag":29,"props":161,"children":162},{},[163],{"type":26,"value":164},"recorded",{"type":26,"value":166}," to the log (see ",{"type":21,"tag":168,"props":169,"children":171},"a",{"href":170},"#rewriting-the-recorded-response",[172],{"type":26,"value":173},"Rewriting the recorded response",{"type":26,"value":175},").",{"type":21,"tag":177,"props":178,"children":180},"h2",{"id":179},"configuring",[181],{"type":26,"value":182},"Configuring",{"type":21,"tag":22,"props":184,"children":185},{},[186,188,193],{"type":26,"value":187},"A response function is an ordinary function — create it the same way as any other, but select the ",{"type":21,"tag":29,"props":189,"children":190},{},[191],{"type":26,"value":192},"RESPONSE",{"type":26,"value":194}," tab in the editor. That tab exposes the response examples (alert on failure, mark delivery failed, empty/unexpected response) and the delivery-outcome fields described below.",{"type":21,"tag":22,"props":196,"children":197},{},[198],{"type":21,"tag":199,"props":200,"children":203},"img",{"alt":201,"src":202},"Creating a response function from the RESPONSE tab, with ready-made example templates","/images/docs/webhooks/functions/create_response_function.png",[],{"type":21,"tag":22,"props":205,"children":206},{},[207],{"type":26,"value":208},"An output then has two independent function slots:",{"type":21,"tag":210,"props":211,"children":212},"table",{},[213,237],{"type":21,"tag":214,"props":215,"children":216},"thead",{},[217],{"type":21,"tag":218,"props":219,"children":220},"tr",{},[221,227,232],{"type":21,"tag":222,"props":223,"children":224},"th",{},[225],{"type":26,"value":226},"Slot",{"type":21,"tag":222,"props":228,"children":229},{},[230],{"type":26,"value":231},"Field",{"type":21,"tag":222,"props":233,"children":234},{},[235],{"type":26,"value":236},"When it runs",{"type":21,"tag":238,"props":239,"children":240},"tbody",{},[241,264],{"type":21,"tag":218,"props":242,"children":243},{},[244,250,259],{"type":21,"tag":245,"props":246,"children":247},"td",{},[248],{"type":26,"value":249},"Request function",{"type":21,"tag":245,"props":251,"children":252},{},[253],{"type":21,"tag":101,"props":254,"children":256},{"className":255},[],[257],{"type":26,"value":258},"function_id",{"type":21,"tag":245,"props":260,"children":261},{},[262],{"type":26,"value":263},"before delivery — can transform the outgoing request",{"type":21,"tag":218,"props":265,"children":266},{},[267,272,281],{"type":21,"tag":245,"props":268,"children":269},{},[270],{"type":26,"value":271},"Response function",{"type":21,"tag":245,"props":273,"children":274},{},[275],{"type":21,"tag":101,"props":276,"children":278},{"className":277},[],[279],{"type":26,"value":280},"response_function_id",{"type":21,"tag":245,"props":282,"children":283},{},[284],{"type":26,"value":285},"after delivery — reads the outcome, can flag the recorded response",{"type":21,"tag":22,"props":287,"children":288},{},[289,291,295],{"type":26,"value":290},"Both are optional. In the dashboard, open the output and use the ",{"type":21,"tag":29,"props":292,"children":293},{},[294],{"type":26,"value":15},{"type":26,"value":296}," row — a dialog with two dropdowns, clearly marked \"runs before delivery\" and \"runs after delivery\". Pick your response function from the second dropdown.",{"type":21,"tag":22,"props":298,"children":299},{},[300],{"type":21,"tag":199,"props":301,"children":304},{"alt":302,"src":303},"Attaching a response function to an output — the Functions dialog has separate request and response dropdowns","/images/docs/webhooks/functions/select_response_function.png",[],{"type":21,"tag":22,"props":306,"children":307},{},[308],{"type":26,"value":309},"You can also set them over the API:",{"type":21,"tag":311,"props":312,"children":316},"pre",{"className":313,"code":314,"language":315,"meta":7,"style":7},"language-jsonc shiki shiki-themes github-dark","PUT /v1/buckets/{bucketId}/outputs/{outputId}\n{\n  \"name\": \"my-endpoint\",\n  \"destination\": \"https://api.example.com/hook\",\n  \"function_id\": \"\u003Crequest function id>\",          // runs before delivery (optional)\n  \"response_function_id\": \"\u003Cresponse function id>\"  // runs after delivery  (optional)\n}\n","jsonc",[317],{"type":21,"tag":101,"props":318,"children":319},{"__ignoreMap":7},[320,331,340,349,358,367,376],{"type":21,"tag":321,"props":322,"children":325},"span",{"class":323,"line":324},"line",1,[326],{"type":21,"tag":321,"props":327,"children":328},{},[329],{"type":26,"value":330},"PUT /v1/buckets/{bucketId}/outputs/{outputId}\n",{"type":21,"tag":321,"props":332,"children":334},{"class":323,"line":333},2,[335],{"type":21,"tag":321,"props":336,"children":337},{},[338],{"type":26,"value":339},"{\n",{"type":21,"tag":321,"props":341,"children":343},{"class":323,"line":342},3,[344],{"type":21,"tag":321,"props":345,"children":346},{},[347],{"type":26,"value":348},"  \"name\": \"my-endpoint\",\n",{"type":21,"tag":321,"props":350,"children":352},{"class":323,"line":351},4,[353],{"type":21,"tag":321,"props":354,"children":355},{},[356],{"type":26,"value":357},"  \"destination\": \"https://api.example.com/hook\",\n",{"type":21,"tag":321,"props":359,"children":361},{"class":323,"line":360},5,[362],{"type":21,"tag":321,"props":363,"children":364},{},[365],{"type":26,"value":366},"  \"function_id\": \"\u003Crequest function id>\",          // runs before delivery (optional)\n",{"type":21,"tag":321,"props":368,"children":370},{"class":323,"line":369},6,[371],{"type":21,"tag":321,"props":372,"children":373},{},[374],{"type":26,"value":375},"  \"response_function_id\": \"\u003Cresponse function id>\"  // runs after delivery  (optional)\n",{"type":21,"tag":321,"props":377,"children":379},{"class":323,"line":378},7,[380],{"type":21,"tag":321,"props":381,"children":382},{},[383],{"type":26,"value":384},"}\n",{"type":21,"tag":22,"props":386,"children":387},{},[388,390,395,397,403,405,411,413,418],{"type":26,"value":389},"The referenced function must belong to your account; it is validated on create/update exactly like ",{"type":21,"tag":101,"props":391,"children":393},{"className":392},[],[394],{"type":26,"value":258},{"type":26,"value":396},". The ",{"type":21,"tag":101,"props":398,"children":400},{"className":399},[],[401],{"type":26,"value":402},"create_output",{"type":26,"value":404}," / ",{"type":21,"tag":101,"props":406,"children":408},{"className":407},[],[409],{"type":26,"value":410},"update_output",{"type":26,"value":412}," MCP tools accept ",{"type":21,"tag":101,"props":414,"children":416},{"className":415},[],[417],{"type":26,"value":280},{"type":26,"value":419}," too.",{"type":21,"tag":177,"props":421,"children":423},{"id":422},"the-r-object",[424,426,432],{"type":26,"value":425},"The ",{"type":21,"tag":101,"props":427,"children":429},{"className":428},[],[430],{"type":26,"value":431},"r",{"type":26,"value":433}," object",{"type":21,"tag":22,"props":435,"children":436},{},[437,439,445,447,453,454,460,461,467],{"type":26,"value":438},"In addition to the usual request fields (",{"type":21,"tag":101,"props":440,"children":442},{"className":441},[],[443],{"type":26,"value":444},"r.body",{"type":26,"value":446},", ",{"type":21,"tag":101,"props":448,"children":450},{"className":449},[],[451],{"type":26,"value":452},"r.headers",{"type":26,"value":446},{"type":21,"tag":101,"props":455,"children":457},{"className":456},[],[458],{"type":26,"value":459},"r.method",{"type":26,"value":446},{"type":21,"tag":101,"props":462,"children":464},{"className":463},[],[465],{"type":26,"value":466},"r.metadata",{"type":26,"value":468},", …), a response function reads the delivery outcome:",{"type":21,"tag":210,"props":470,"children":471},{},[472,493],{"type":21,"tag":214,"props":473,"children":474},{},[475],{"type":21,"tag":218,"props":476,"children":477},{},[478,483,488],{"type":21,"tag":222,"props":479,"children":480},{},[481],{"type":26,"value":482},"JavaScript",{"type":21,"tag":222,"props":484,"children":485},{},[486],{"type":26,"value":487},"Lua",{"type":21,"tag":222,"props":489,"children":490},{},[491],{"type":26,"value":492},"Description",{"type":21,"tag":238,"props":494,"children":495},{},[496,535,561,587],{"type":21,"tag":218,"props":497,"children":498},{},[499,508,517],{"type":21,"tag":245,"props":500,"children":501},{},[502],{"type":21,"tag":101,"props":503,"children":505},{"className":504},[],[506],{"type":26,"value":507},"r.responseStatus",{"type":21,"tag":245,"props":509,"children":510},{},[511],{"type":21,"tag":101,"props":512,"children":514},{"className":513},[],[515],{"type":26,"value":516},"r.ResponseStatus",{"type":21,"tag":245,"props":518,"children":519},{},[520,522,533],{"type":26,"value":521},"HTTP status code. ",{"type":21,"tag":29,"props":523,"children":524},{},[525,531],{"type":21,"tag":101,"props":526,"children":528},{"className":527},[],[529],{"type":26,"value":530},"0",{"type":26,"value":532}," means no HTTP response",{"type":26,"value":534}," — a connection error, timeout, or TLS failure.",{"type":21,"tag":218,"props":536,"children":537},{},[538,547,556],{"type":21,"tag":245,"props":539,"children":540},{},[541],{"type":21,"tag":101,"props":542,"children":544},{"className":543},[],[545],{"type":26,"value":546},"r.responseBody",{"type":21,"tag":245,"props":548,"children":549},{},[550],{"type":21,"tag":101,"props":551,"children":553},{"className":552},[],[554],{"type":26,"value":555},"r.ResponseBody",{"type":21,"tag":245,"props":557,"children":558},{},[559],{"type":26,"value":560},"Response body (string).",{"type":21,"tag":218,"props":562,"children":563},{},[564,573,582],{"type":21,"tag":245,"props":565,"children":566},{},[567],{"type":21,"tag":101,"props":568,"children":570},{"className":569},[],[571],{"type":26,"value":572},"r.responseHeaders",{"type":21,"tag":245,"props":574,"children":575},{},[576],{"type":21,"tag":101,"props":577,"children":579},{"className":578},[],[580],{"type":26,"value":581},"r.ResponseHeader",{"type":21,"tag":245,"props":583,"children":584},{},[585],{"type":26,"value":586},"Response headers (object/table).",{"type":21,"tag":218,"props":588,"children":589},{},[590,599,608],{"type":21,"tag":245,"props":591,"children":592},{},[593],{"type":21,"tag":101,"props":594,"children":596},{"className":595},[],[597],{"type":26,"value":598},"r.error",{"type":21,"tag":245,"props":600,"children":601},{},[602],{"type":21,"tag":101,"props":603,"children":605},{"className":604},[],[606],{"type":26,"value":607},"r.DeliveryError",{"type":21,"tag":245,"props":609,"children":610},{},[611,613,618],{"type":26,"value":612},"Transport error string when the status is ",{"type":21,"tag":101,"props":614,"children":616},{"className":615},[],[617],{"type":26,"value":530},{"type":26,"value":619},"; empty when an HTTP response was received (even a 5xx).",{"type":21,"tag":22,"props":621,"children":622},{},[623,628,630,636,637,643,644,650,651,657,658,664,666,672,673,679,681,687],{"type":21,"tag":101,"props":624,"children":626},{"className":625},[],[627],{"type":26,"value":466},{"type":26,"value":629}," carries ",{"type":21,"tag":101,"props":631,"children":633},{"className":632},[],[634],{"type":26,"value":635},"output_name",{"type":26,"value":446},{"type":21,"tag":101,"props":638,"children":640},{"className":639},[],[641],{"type":26,"value":642},"output_url",{"type":26,"value":446},{"type":21,"tag":101,"props":645,"children":647},{"className":646},[],[648],{"type":26,"value":649},"bucket_name",{"type":26,"value":446},{"type":21,"tag":101,"props":652,"children":654},{"className":653},[],[655],{"type":26,"value":656},"bucket_id",{"type":26,"value":446},{"type":21,"tag":101,"props":659,"children":661},{"className":660},[],[662],{"type":26,"value":663},"output_id",{"type":26,"value":665}," (and ",{"type":21,"tag":101,"props":667,"children":669},{"className":668},[],[670],{"type":26,"value":671},"input_name",{"type":26,"value":404},{"type":21,"tag":101,"props":674,"children":676},{"className":675},[],[677],{"type":26,"value":678},"input_id",{"type":26,"value":680}," when available), so an alert can name the output that failed. See ",{"type":21,"tag":168,"props":682,"children":684},{"href":683},"/docs/webhooks/functions/accessing-metadata",[685],{"type":26,"value":686},"Accessing metadata",{"type":26,"value":69},{"type":21,"tag":22,"props":689,"children":690},{},[691,693,698,700,706],{"type":26,"value":692},"The function always runs for ",{"type":21,"tag":29,"props":694,"children":695},{},[696],{"type":26,"value":697},"every",{"type":26,"value":699}," terminal outcome — success and failure — so the function itself decides what to act on (for example, only alert when ",{"type":21,"tag":101,"props":701,"children":703},{"className":702},[],[704],{"type":26,"value":705},"responseStatus >= 400",{"type":26,"value":175},{"type":21,"tag":177,"props":708,"children":710},{"id":709},"example-alert-on-a-failed-delivery",[711],{"type":26,"value":712},"Example: alert on a failed delivery",{"type":21,"tag":22,"props":714,"children":715},{},[716,718,724,726,732],{"type":26,"value":717},"This is the simplest, alert-only pattern: when a delivery fails (no response, or a 4xx/5xx), post a message to Slack. Set ",{"type":21,"tag":101,"props":719,"children":721},{"className":720},[],[722],{"type":26,"value":723},"slack_webhook_url",{"type":26,"value":725}," as a ",{"type":21,"tag":168,"props":727,"children":729},{"href":728},"/docs/webhooks/functions/modify-request#getting-configuration-values",[730],{"type":26,"value":731},"config variable",{"type":26,"value":733}," on the function.",{"type":21,"tag":735,"props":736,"children":737},"code-switcher",{},[738,1198],{"type":21,"tag":739,"props":740,"children":741},"template",{"v-slot:javascript":7},[742],{"type":21,"tag":311,"props":743,"children":747},{"className":744,"code":745,"language":746,"meta":7,"style":7},"language-javascript shiki shiki-themes github-dark","// Runs AFTER the webhook is delivered. Read-only alert on failure.\nvar failed = r.responseStatus === 0 || r.responseStatus >= 400;\n\nif (failed) {\n  var reason = r.responseStatus === 0\n    ? (\"delivery error: \" + r.error)        // 0 == timeout / connection / TLS error\n    : (\"HTTP \" + r.responseStatus);\n\n  console.log(\"delivery to \" + r.metadata[\"output_name\"] + \" failed: \" + reason);\n\n  var url = cfg.get(\"slack_webhook_url\");\n  if (url) {\n    http.post(url, JSON.stringify({\n      text: \"⚠️ Webhook delivery to *\" + r.metadata[\"output_name\"] + \"* failed: \" + reason\n    }), { headers: { \"Content-Type\": \"application/json\" } });\n  }\n}\n","javascript",[748],{"type":21,"tag":101,"props":749,"children":750},{"__ignoreMap":7},[751,760,820,829,842,872,906,932,940,1003,1011,1052,1066,1104,1152,1181,1190],{"type":21,"tag":321,"props":752,"children":753},{"class":323,"line":324},[754],{"type":21,"tag":321,"props":755,"children":757},{"style":756},"--shiki-default:#6A737D",[758],{"type":26,"value":759},"// Runs AFTER the webhook is delivered. Read-only alert on failure.\n",{"type":21,"tag":321,"props":761,"children":762},{"class":323,"line":333},[763,769,775,780,785,790,796,801,805,810,815],{"type":21,"tag":321,"props":764,"children":766},{"style":765},"--shiki-default:#F97583",[767],{"type":26,"value":768},"var",{"type":21,"tag":321,"props":770,"children":772},{"style":771},"--shiki-default:#E1E4E8",[773],{"type":26,"value":774}," failed ",{"type":21,"tag":321,"props":776,"children":777},{"style":765},[778],{"type":26,"value":779},"=",{"type":21,"tag":321,"props":781,"children":782},{"style":771},[783],{"type":26,"value":784}," r.responseStatus ",{"type":21,"tag":321,"props":786,"children":787},{"style":765},[788],{"type":26,"value":789},"===",{"type":21,"tag":321,"props":791,"children":793},{"style":792},"--shiki-default:#79B8FF",[794],{"type":26,"value":795}," 0",{"type":21,"tag":321,"props":797,"children":798},{"style":765},[799],{"type":26,"value":800}," ||",{"type":21,"tag":321,"props":802,"children":803},{"style":771},[804],{"type":26,"value":784},{"type":21,"tag":321,"props":806,"children":807},{"style":765},[808],{"type":26,"value":809},">=",{"type":21,"tag":321,"props":811,"children":812},{"style":792},[813],{"type":26,"value":814}," 400",{"type":21,"tag":321,"props":816,"children":817},{"style":771},[818],{"type":26,"value":819},";\n",{"type":21,"tag":321,"props":821,"children":822},{"class":323,"line":342},[823],{"type":21,"tag":321,"props":824,"children":826},{"emptyLinePlaceholder":825},true,[827],{"type":26,"value":828},"\n",{"type":21,"tag":321,"props":830,"children":831},{"class":323,"line":351},[832,837],{"type":21,"tag":321,"props":833,"children":834},{"style":765},[835],{"type":26,"value":836},"if",{"type":21,"tag":321,"props":838,"children":839},{"style":771},[840],{"type":26,"value":841}," (failed) {\n",{"type":21,"tag":321,"props":843,"children":844},{"class":323,"line":360},[845,850,855,859,863,867],{"type":21,"tag":321,"props":846,"children":847},{"style":765},[848],{"type":26,"value":849},"  var",{"type":21,"tag":321,"props":851,"children":852},{"style":771},[853],{"type":26,"value":854}," reason ",{"type":21,"tag":321,"props":856,"children":857},{"style":765},[858],{"type":26,"value":779},{"type":21,"tag":321,"props":860,"children":861},{"style":771},[862],{"type":26,"value":784},{"type":21,"tag":321,"props":864,"children":865},{"style":765},[866],{"type":26,"value":789},{"type":21,"tag":321,"props":868,"children":869},{"style":792},[870],{"type":26,"value":871}," 0\n",{"type":21,"tag":321,"props":873,"children":874},{"class":323,"line":369},[875,880,885,891,896,901],{"type":21,"tag":321,"props":876,"children":877},{"style":765},[878],{"type":26,"value":879},"    ?",{"type":21,"tag":321,"props":881,"children":882},{"style":771},[883],{"type":26,"value":884}," (",{"type":21,"tag":321,"props":886,"children":888},{"style":887},"--shiki-default:#9ECBFF",[889],{"type":26,"value":890},"\"delivery error: \"",{"type":21,"tag":321,"props":892,"children":893},{"style":765},[894],{"type":26,"value":895}," +",{"type":21,"tag":321,"props":897,"children":898},{"style":771},[899],{"type":26,"value":900}," r.error)        ",{"type":21,"tag":321,"props":902,"children":903},{"style":756},[904],{"type":26,"value":905},"// 0 == timeout / connection / TLS error\n",{"type":21,"tag":321,"props":907,"children":908},{"class":323,"line":378},[909,914,918,923,927],{"type":21,"tag":321,"props":910,"children":911},{"style":765},[912],{"type":26,"value":913},"    :",{"type":21,"tag":321,"props":915,"children":916},{"style":771},[917],{"type":26,"value":884},{"type":21,"tag":321,"props":919,"children":920},{"style":887},[921],{"type":26,"value":922},"\"HTTP \"",{"type":21,"tag":321,"props":924,"children":925},{"style":765},[926],{"type":26,"value":895},{"type":21,"tag":321,"props":928,"children":929},{"style":771},[930],{"type":26,"value":931}," r.responseStatus);\n",{"type":21,"tag":321,"props":933,"children":935},{"class":323,"line":934},8,[936],{"type":21,"tag":321,"props":937,"children":938},{"emptyLinePlaceholder":825},[939],{"type":26,"value":828},{"type":21,"tag":321,"props":941,"children":943},{"class":323,"line":942},9,[944,949,955,960,965,969,974,979,984,989,994,998],{"type":21,"tag":321,"props":945,"children":946},{"style":771},[947],{"type":26,"value":948},"  console.",{"type":21,"tag":321,"props":950,"children":952},{"style":951},"--shiki-default:#B392F0",[953],{"type":26,"value":954},"log",{"type":21,"tag":321,"props":956,"children":957},{"style":771},[958],{"type":26,"value":959},"(",{"type":21,"tag":321,"props":961,"children":962},{"style":887},[963],{"type":26,"value":964},"\"delivery to \"",{"type":21,"tag":321,"props":966,"children":967},{"style":765},[968],{"type":26,"value":895},{"type":21,"tag":321,"props":970,"children":971},{"style":771},[972],{"type":26,"value":973}," r.metadata[",{"type":21,"tag":321,"props":975,"children":976},{"style":887},[977],{"type":26,"value":978},"\"output_name\"",{"type":21,"tag":321,"props":980,"children":981},{"style":771},[982],{"type":26,"value":983},"] ",{"type":21,"tag":321,"props":985,"children":986},{"style":765},[987],{"type":26,"value":988},"+",{"type":21,"tag":321,"props":990,"children":991},{"style":887},[992],{"type":26,"value":993}," \" failed: \"",{"type":21,"tag":321,"props":995,"children":996},{"style":765},[997],{"type":26,"value":895},{"type":21,"tag":321,"props":999,"children":1000},{"style":771},[1001],{"type":26,"value":1002}," reason);\n",{"type":21,"tag":321,"props":1004,"children":1006},{"class":323,"line":1005},10,[1007],{"type":21,"tag":321,"props":1008,"children":1009},{"emptyLinePlaceholder":825},[1010],{"type":26,"value":828},{"type":21,"tag":321,"props":1012,"children":1014},{"class":323,"line":1013},11,[1015,1019,1024,1028,1033,1038,1042,1047],{"type":21,"tag":321,"props":1016,"children":1017},{"style":765},[1018],{"type":26,"value":849},{"type":21,"tag":321,"props":1020,"children":1021},{"style":771},[1022],{"type":26,"value":1023}," url ",{"type":21,"tag":321,"props":1025,"children":1026},{"style":765},[1027],{"type":26,"value":779},{"type":21,"tag":321,"props":1029,"children":1030},{"style":771},[1031],{"type":26,"value":1032}," cfg.",{"type":21,"tag":321,"props":1034,"children":1035},{"style":951},[1036],{"type":26,"value":1037},"get",{"type":21,"tag":321,"props":1039,"children":1040},{"style":771},[1041],{"type":26,"value":959},{"type":21,"tag":321,"props":1043,"children":1044},{"style":887},[1045],{"type":26,"value":1046},"\"slack_webhook_url\"",{"type":21,"tag":321,"props":1048,"children":1049},{"style":771},[1050],{"type":26,"value":1051},");\n",{"type":21,"tag":321,"props":1053,"children":1055},{"class":323,"line":1054},12,[1056,1061],{"type":21,"tag":321,"props":1057,"children":1058},{"style":765},[1059],{"type":26,"value":1060},"  if",{"type":21,"tag":321,"props":1062,"children":1063},{"style":771},[1064],{"type":26,"value":1065}," (url) {\n",{"type":21,"tag":321,"props":1067,"children":1069},{"class":323,"line":1068},13,[1070,1075,1080,1085,1090,1094,1099],{"type":21,"tag":321,"props":1071,"children":1072},{"style":771},[1073],{"type":26,"value":1074},"    http.",{"type":21,"tag":321,"props":1076,"children":1077},{"style":951},[1078],{"type":26,"value":1079},"post",{"type":21,"tag":321,"props":1081,"children":1082},{"style":771},[1083],{"type":26,"value":1084},"(url, ",{"type":21,"tag":321,"props":1086,"children":1087},{"style":792},[1088],{"type":26,"value":1089},"JSON",{"type":21,"tag":321,"props":1091,"children":1092},{"style":771},[1093],{"type":26,"value":69},{"type":21,"tag":321,"props":1095,"children":1096},{"style":951},[1097],{"type":26,"value":1098},"stringify",{"type":21,"tag":321,"props":1100,"children":1101},{"style":771},[1102],{"type":26,"value":1103},"({\n",{"type":21,"tag":321,"props":1105,"children":1107},{"class":323,"line":1106},14,[1108,1113,1118,1122,1126,1130,1134,1138,1143,1147],{"type":21,"tag":321,"props":1109,"children":1110},{"style":771},[1111],{"type":26,"value":1112},"      text: ",{"type":21,"tag":321,"props":1114,"children":1115},{"style":887},[1116],{"type":26,"value":1117},"\"⚠️ Webhook delivery to *\"",{"type":21,"tag":321,"props":1119,"children":1120},{"style":765},[1121],{"type":26,"value":895},{"type":21,"tag":321,"props":1123,"children":1124},{"style":771},[1125],{"type":26,"value":973},{"type":21,"tag":321,"props":1127,"children":1128},{"style":887},[1129],{"type":26,"value":978},{"type":21,"tag":321,"props":1131,"children":1132},{"style":771},[1133],{"type":26,"value":983},{"type":21,"tag":321,"props":1135,"children":1136},{"style":765},[1137],{"type":26,"value":988},{"type":21,"tag":321,"props":1139,"children":1140},{"style":887},[1141],{"type":26,"value":1142}," \"* failed: \"",{"type":21,"tag":321,"props":1144,"children":1145},{"style":765},[1146],{"type":26,"value":895},{"type":21,"tag":321,"props":1148,"children":1149},{"style":771},[1150],{"type":26,"value":1151}," reason\n",{"type":21,"tag":321,"props":1153,"children":1155},{"class":323,"line":1154},15,[1156,1161,1166,1171,1176],{"type":21,"tag":321,"props":1157,"children":1158},{"style":771},[1159],{"type":26,"value":1160},"    }), { headers: { ",{"type":21,"tag":321,"props":1162,"children":1163},{"style":887},[1164],{"type":26,"value":1165},"\"Content-Type\"",{"type":21,"tag":321,"props":1167,"children":1168},{"style":771},[1169],{"type":26,"value":1170},": ",{"type":21,"tag":321,"props":1172,"children":1173},{"style":887},[1174],{"type":26,"value":1175},"\"application/json\"",{"type":21,"tag":321,"props":1177,"children":1178},{"style":771},[1179],{"type":26,"value":1180}," } });\n",{"type":21,"tag":321,"props":1182,"children":1184},{"class":323,"line":1183},16,[1185],{"type":21,"tag":321,"props":1186,"children":1187},{"style":771},[1188],{"type":26,"value":1189},"  }\n",{"type":21,"tag":321,"props":1191,"children":1193},{"class":323,"line":1192},17,[1194],{"type":21,"tag":321,"props":1195,"children":1196},{"style":771},[1197],{"type":26,"value":384},{"type":21,"tag":739,"props":1199,"children":1200},{"v-slot:lua":7},[1201],{"type":21,"tag":311,"props":1202,"children":1206},{"className":1203,"code":1204,"language":1205,"meta":7,"style":7},"language-lua shiki shiki-themes github-dark","-- Runs AFTER the webhook is delivered. Read-only alert on failure.\nlocal http = require(\"http\")\nlocal json = require(\"json\")\n\nlocal failed = r.ResponseStatus == 0 or r.ResponseStatus >= 400\nif failed then\n  local reason = (r.ResponseStatus == 0)\n    and (\"delivery error: \" .. r.DeliveryError)   -- 0 == timeout / connection / TLS error\n    or (\"HTTP \" .. r.ResponseStatus)\n\n  local out_name = r.metadata[\"output_name\"] or \"output\"\n  local payload, err = json.encode({\n    text = \"Webhook delivery to \" .. out_name .. \" failed: \" .. reason\n  })\n  if err then error(err) end\n\n  local url = cfg:GetValue(\"slack_webhook_url\")\n  if url ~= \"\" then\n    http.request(\"POST\", url, {\n      headers = { [\"Content-Type\"] = \"application/json\" },\n      body = payload\n    })\n  end\nend\n","lua",[1207],{"type":21,"tag":101,"props":1208,"children":1209},{"__ignoreMap":7},[1210,1218,1254,1287,1294,1351,1367,1404,1445,1478,1485,1533,1563,1605,1613,1645,1652,1694,1720,1747,1787,1805,1814,1823],{"type":21,"tag":321,"props":1211,"children":1212},{"class":323,"line":324},[1213],{"type":21,"tag":321,"props":1214,"children":1215},{"style":756},[1216],{"type":26,"value":1217},"-- Runs AFTER the webhook is delivered. Read-only alert on failure.\n",{"type":21,"tag":321,"props":1219,"children":1220},{"class":323,"line":333},[1221,1226,1231,1235,1240,1244,1249],{"type":21,"tag":321,"props":1222,"children":1223},{"style":765},[1224],{"type":26,"value":1225},"local",{"type":21,"tag":321,"props":1227,"children":1228},{"style":771},[1229],{"type":26,"value":1230}," http ",{"type":21,"tag":321,"props":1232,"children":1233},{"style":765},[1234],{"type":26,"value":779},{"type":21,"tag":321,"props":1236,"children":1237},{"style":792},[1238],{"type":26,"value":1239}," require",{"type":21,"tag":321,"props":1241,"children":1242},{"style":771},[1243],{"type":26,"value":959},{"type":21,"tag":321,"props":1245,"children":1246},{"style":887},[1247],{"type":26,"value":1248},"\"http\"",{"type":21,"tag":321,"props":1250,"children":1251},{"style":771},[1252],{"type":26,"value":1253},")\n",{"type":21,"tag":321,"props":1255,"children":1256},{"class":323,"line":342},[1257,1261,1266,1270,1274,1278,1283],{"type":21,"tag":321,"props":1258,"children":1259},{"style":765},[1260],{"type":26,"value":1225},{"type":21,"tag":321,"props":1262,"children":1263},{"style":771},[1264],{"type":26,"value":1265}," json ",{"type":21,"tag":321,"props":1267,"children":1268},{"style":765},[1269],{"type":26,"value":779},{"type":21,"tag":321,"props":1271,"children":1272},{"style":792},[1273],{"type":26,"value":1239},{"type":21,"tag":321,"props":1275,"children":1276},{"style":771},[1277],{"type":26,"value":959},{"type":21,"tag":321,"props":1279,"children":1280},{"style":887},[1281],{"type":26,"value":1282},"\"json\"",{"type":21,"tag":321,"props":1284,"children":1285},{"style":771},[1286],{"type":26,"value":1253},{"type":21,"tag":321,"props":1288,"children":1289},{"class":323,"line":351},[1290],{"type":21,"tag":321,"props":1291,"children":1292},{"emptyLinePlaceholder":825},[1293],{"type":26,"value":828},{"type":21,"tag":321,"props":1295,"children":1296},{"class":323,"line":360},[1297,1301,1305,1309,1314,1319,1324,1328,1333,1337,1341,1346],{"type":21,"tag":321,"props":1298,"children":1299},{"style":765},[1300],{"type":26,"value":1225},{"type":21,"tag":321,"props":1302,"children":1303},{"style":771},[1304],{"type":26,"value":774},{"type":21,"tag":321,"props":1306,"children":1307},{"style":765},[1308],{"type":26,"value":779},{"type":21,"tag":321,"props":1310,"children":1311},{"style":771},[1312],{"type":26,"value":1313}," r.",{"type":21,"tag":321,"props":1315,"children":1316},{"style":951},[1317],{"type":26,"value":1318},"ResponseStatus",{"type":21,"tag":321,"props":1320,"children":1321},{"style":765},[1322],{"type":26,"value":1323}," ==",{"type":21,"tag":321,"props":1325,"children":1326},{"style":792},[1327],{"type":26,"value":795},{"type":21,"tag":321,"props":1329,"children":1330},{"style":765},[1331],{"type":26,"value":1332}," or",{"type":21,"tag":321,"props":1334,"children":1335},{"style":771},[1336],{"type":26,"value":1313},{"type":21,"tag":321,"props":1338,"children":1339},{"style":951},[1340],{"type":26,"value":1318},{"type":21,"tag":321,"props":1342,"children":1343},{"style":765},[1344],{"type":26,"value":1345}," >=",{"type":21,"tag":321,"props":1347,"children":1348},{"style":792},[1349],{"type":26,"value":1350}," 400\n",{"type":21,"tag":321,"props":1352,"children":1353},{"class":323,"line":369},[1354,1358,1362],{"type":21,"tag":321,"props":1355,"children":1356},{"style":765},[1357],{"type":26,"value":836},{"type":21,"tag":321,"props":1359,"children":1360},{"style":771},[1361],{"type":26,"value":774},{"type":21,"tag":321,"props":1363,"children":1364},{"style":765},[1365],{"type":26,"value":1366},"then\n",{"type":21,"tag":321,"props":1368,"children":1369},{"class":323,"line":378},[1370,1375,1379,1383,1388,1392,1396,1400],{"type":21,"tag":321,"props":1371,"children":1372},{"style":765},[1373],{"type":26,"value":1374},"  local",{"type":21,"tag":321,"props":1376,"children":1377},{"style":771},[1378],{"type":26,"value":854},{"type":21,"tag":321,"props":1380,"children":1381},{"style":765},[1382],{"type":26,"value":779},{"type":21,"tag":321,"props":1384,"children":1385},{"style":771},[1386],{"type":26,"value":1387}," (r.",{"type":21,"tag":321,"props":1389,"children":1390},{"style":951},[1391],{"type":26,"value":1318},{"type":21,"tag":321,"props":1393,"children":1394},{"style":765},[1395],{"type":26,"value":1323},{"type":21,"tag":321,"props":1397,"children":1398},{"style":792},[1399],{"type":26,"value":795},{"type":21,"tag":321,"props":1401,"children":1402},{"style":771},[1403],{"type":26,"value":1253},{"type":21,"tag":321,"props":1405,"children":1406},{"class":323,"line":934},[1407,1412,1416,1421,1426,1430,1435,1440],{"type":21,"tag":321,"props":1408,"children":1409},{"style":765},[1410],{"type":26,"value":1411},"    and",{"type":21,"tag":321,"props":1413,"children":1414},{"style":771},[1415],{"type":26,"value":884},{"type":21,"tag":321,"props":1417,"children":1418},{"style":887},[1419],{"type":26,"value":1420},"\"delivery error: \" ",{"type":21,"tag":321,"props":1422,"children":1423},{"style":765},[1424],{"type":26,"value":1425},"..",{"type":21,"tag":321,"props":1427,"children":1428},{"style":771},[1429],{"type":26,"value":1313},{"type":21,"tag":321,"props":1431,"children":1432},{"style":951},[1433],{"type":26,"value":1434},"DeliveryError",{"type":21,"tag":321,"props":1436,"children":1437},{"style":771},[1438],{"type":26,"value":1439},")   ",{"type":21,"tag":321,"props":1441,"children":1442},{"style":756},[1443],{"type":26,"value":1444},"-- 0 == timeout / connection / TLS error\n",{"type":21,"tag":321,"props":1446,"children":1447},{"class":323,"line":942},[1448,1453,1457,1462,1466,1470,1474],{"type":21,"tag":321,"props":1449,"children":1450},{"style":765},[1451],{"type":26,"value":1452},"    or",{"type":21,"tag":321,"props":1454,"children":1455},{"style":771},[1456],{"type":26,"value":884},{"type":21,"tag":321,"props":1458,"children":1459},{"style":887},[1460],{"type":26,"value":1461},"\"HTTP \" ",{"type":21,"tag":321,"props":1463,"children":1464},{"style":765},[1465],{"type":26,"value":1425},{"type":21,"tag":321,"props":1467,"children":1468},{"style":771},[1469],{"type":26,"value":1313},{"type":21,"tag":321,"props":1471,"children":1472},{"style":951},[1473],{"type":26,"value":1318},{"type":21,"tag":321,"props":1475,"children":1476},{"style":771},[1477],{"type":26,"value":1253},{"type":21,"tag":321,"props":1479,"children":1480},{"class":323,"line":1005},[1481],{"type":21,"tag":321,"props":1482,"children":1483},{"emptyLinePlaceholder":825},[1484],{"type":26,"value":828},{"type":21,"tag":321,"props":1486,"children":1487},{"class":323,"line":1013},[1488,1492,1497,1501,1505,1510,1515,1519,1523,1528],{"type":21,"tag":321,"props":1489,"children":1490},{"style":765},[1491],{"type":26,"value":1374},{"type":21,"tag":321,"props":1493,"children":1494},{"style":771},[1495],{"type":26,"value":1496}," out_name ",{"type":21,"tag":321,"props":1498,"children":1499},{"style":765},[1500],{"type":26,"value":779},{"type":21,"tag":321,"props":1502,"children":1503},{"style":771},[1504],{"type":26,"value":1313},{"type":21,"tag":321,"props":1506,"children":1507},{"style":951},[1508],{"type":26,"value":1509},"metadata",{"type":21,"tag":321,"props":1511,"children":1512},{"style":771},[1513],{"type":26,"value":1514},"[",{"type":21,"tag":321,"props":1516,"children":1517},{"style":887},[1518],{"type":26,"value":978},{"type":21,"tag":321,"props":1520,"children":1521},{"style":771},[1522],{"type":26,"value":983},{"type":21,"tag":321,"props":1524,"children":1525},{"style":765},[1526],{"type":26,"value":1527},"or",{"type":21,"tag":321,"props":1529,"children":1530},{"style":887},[1531],{"type":26,"value":1532}," \"output\"\n",{"type":21,"tag":321,"props":1534,"children":1535},{"class":323,"line":1054},[1536,1540,1545,1549,1554,1559],{"type":21,"tag":321,"props":1537,"children":1538},{"style":765},[1539],{"type":26,"value":1374},{"type":21,"tag":321,"props":1541,"children":1542},{"style":771},[1543],{"type":26,"value":1544}," payload, err ",{"type":21,"tag":321,"props":1546,"children":1547},{"style":765},[1548],{"type":26,"value":779},{"type":21,"tag":321,"props":1550,"children":1551},{"style":771},[1552],{"type":26,"value":1553}," json.",{"type":21,"tag":321,"props":1555,"children":1556},{"style":792},[1557],{"type":26,"value":1558},"encode",{"type":21,"tag":321,"props":1560,"children":1561},{"style":771},[1562],{"type":26,"value":1103},{"type":21,"tag":321,"props":1564,"children":1565},{"class":323,"line":1068},[1566,1571,1575,1580,1584,1588,1592,1597,1601],{"type":21,"tag":321,"props":1567,"children":1568},{"style":771},[1569],{"type":26,"value":1570},"    text ",{"type":21,"tag":321,"props":1572,"children":1573},{"style":765},[1574],{"type":26,"value":779},{"type":21,"tag":321,"props":1576,"children":1577},{"style":887},[1578],{"type":26,"value":1579}," \"Webhook delivery to \" ",{"type":21,"tag":321,"props":1581,"children":1582},{"style":765},[1583],{"type":26,"value":1425},{"type":21,"tag":321,"props":1585,"children":1586},{"style":771},[1587],{"type":26,"value":1496},{"type":21,"tag":321,"props":1589,"children":1590},{"style":765},[1591],{"type":26,"value":1425},{"type":21,"tag":321,"props":1593,"children":1594},{"style":887},[1595],{"type":26,"value":1596}," \" failed: \" ",{"type":21,"tag":321,"props":1598,"children":1599},{"style":765},[1600],{"type":26,"value":1425},{"type":21,"tag":321,"props":1602,"children":1603},{"style":771},[1604],{"type":26,"value":1151},{"type":21,"tag":321,"props":1606,"children":1607},{"class":323,"line":1106},[1608],{"type":21,"tag":321,"props":1609,"children":1610},{"style":771},[1611],{"type":26,"value":1612},"  })\n",{"type":21,"tag":321,"props":1614,"children":1615},{"class":323,"line":1154},[1616,1620,1625,1630,1635,1640],{"type":21,"tag":321,"props":1617,"children":1618},{"style":765},[1619],{"type":26,"value":1060},{"type":21,"tag":321,"props":1621,"children":1622},{"style":771},[1623],{"type":26,"value":1624}," err ",{"type":21,"tag":321,"props":1626,"children":1627},{"style":765},[1628],{"type":26,"value":1629},"then",{"type":21,"tag":321,"props":1631,"children":1632},{"style":792},[1633],{"type":26,"value":1634}," error",{"type":21,"tag":321,"props":1636,"children":1637},{"style":771},[1638],{"type":26,"value":1639},"(err) ",{"type":21,"tag":321,"props":1641,"children":1642},{"style":765},[1643],{"type":26,"value":1644},"end\n",{"type":21,"tag":321,"props":1646,"children":1647},{"class":323,"line":1183},[1648],{"type":21,"tag":321,"props":1649,"children":1650},{"emptyLinePlaceholder":825},[1651],{"type":26,"value":828},{"type":21,"tag":321,"props":1653,"children":1654},{"class":323,"line":1192},[1655,1659,1663,1667,1672,1677,1682,1686,1690],{"type":21,"tag":321,"props":1656,"children":1657},{"style":765},[1658],{"type":26,"value":1374},{"type":21,"tag":321,"props":1660,"children":1661},{"style":771},[1662],{"type":26,"value":1023},{"type":21,"tag":321,"props":1664,"children":1665},{"style":765},[1666],{"type":26,"value":779},{"type":21,"tag":321,"props":1668,"children":1669},{"style":951},[1670],{"type":26,"value":1671}," cfg",{"type":21,"tag":321,"props":1673,"children":1674},{"style":771},[1675],{"type":26,"value":1676},":",{"type":21,"tag":321,"props":1678,"children":1679},{"style":792},[1680],{"type":26,"value":1681},"GetValue",{"type":21,"tag":321,"props":1683,"children":1684},{"style":771},[1685],{"type":26,"value":959},{"type":21,"tag":321,"props":1687,"children":1688},{"style":887},[1689],{"type":26,"value":1046},{"type":21,"tag":321,"props":1691,"children":1692},{"style":771},[1693],{"type":26,"value":1253},{"type":21,"tag":321,"props":1695,"children":1697},{"class":323,"line":1696},18,[1698,1702,1706,1711,1716],{"type":21,"tag":321,"props":1699,"children":1700},{"style":765},[1701],{"type":26,"value":1060},{"type":21,"tag":321,"props":1703,"children":1704},{"style":771},[1705],{"type":26,"value":1023},{"type":21,"tag":321,"props":1707,"children":1708},{"style":765},[1709],{"type":26,"value":1710},"~=",{"type":21,"tag":321,"props":1712,"children":1713},{"style":887},[1714],{"type":26,"value":1715}," \"\" ",{"type":21,"tag":321,"props":1717,"children":1718},{"style":765},[1719],{"type":26,"value":1366},{"type":21,"tag":321,"props":1721,"children":1723},{"class":323,"line":1722},19,[1724,1728,1733,1737,1742],{"type":21,"tag":321,"props":1725,"children":1726},{"style":771},[1727],{"type":26,"value":1074},{"type":21,"tag":321,"props":1729,"children":1730},{"style":792},[1731],{"type":26,"value":1732},"request",{"type":21,"tag":321,"props":1734,"children":1735},{"style":771},[1736],{"type":26,"value":959},{"type":21,"tag":321,"props":1738,"children":1739},{"style":887},[1740],{"type":26,"value":1741},"\"POST\"",{"type":21,"tag":321,"props":1743,"children":1744},{"style":771},[1745],{"type":26,"value":1746},", url, {\n",{"type":21,"tag":321,"props":1748,"children":1750},{"class":323,"line":1749},20,[1751,1756,1760,1765,1769,1773,1777,1782],{"type":21,"tag":321,"props":1752,"children":1753},{"style":771},[1754],{"type":26,"value":1755},"      headers ",{"type":21,"tag":321,"props":1757,"children":1758},{"style":765},[1759],{"type":26,"value":779},{"type":21,"tag":321,"props":1761,"children":1762},{"style":771},[1763],{"type":26,"value":1764}," { [",{"type":21,"tag":321,"props":1766,"children":1767},{"style":887},[1768],{"type":26,"value":1165},{"type":21,"tag":321,"props":1770,"children":1771},{"style":771},[1772],{"type":26,"value":983},{"type":21,"tag":321,"props":1774,"children":1775},{"style":765},[1776],{"type":26,"value":779},{"type":21,"tag":321,"props":1778,"children":1779},{"style":887},[1780],{"type":26,"value":1781}," \"application/json\" ",{"type":21,"tag":321,"props":1783,"children":1784},{"style":771},[1785],{"type":26,"value":1786},"},\n",{"type":21,"tag":321,"props":1788,"children":1790},{"class":323,"line":1789},21,[1791,1796,1800],{"type":21,"tag":321,"props":1792,"children":1793},{"style":771},[1794],{"type":26,"value":1795},"      body ",{"type":21,"tag":321,"props":1797,"children":1798},{"style":765},[1799],{"type":26,"value":779},{"type":21,"tag":321,"props":1801,"children":1802},{"style":771},[1803],{"type":26,"value":1804}," payload\n",{"type":21,"tag":321,"props":1806,"children":1808},{"class":323,"line":1807},22,[1809],{"type":21,"tag":321,"props":1810,"children":1811},{"style":771},[1812],{"type":26,"value":1813},"    })\n",{"type":21,"tag":321,"props":1815,"children":1817},{"class":323,"line":1816},23,[1818],{"type":21,"tag":321,"props":1819,"children":1820},{"style":765},[1821],{"type":26,"value":1822},"  end\n",{"type":21,"tag":321,"props":1824,"children":1826},{"class":323,"line":1825},24,[1827],{"type":21,"tag":321,"props":1828,"children":1829},{"style":765},[1830],{"type":26,"value":1644},{"type":21,"tag":177,"props":1832,"children":1834},{"id":1833},"example-treat-an-empty-200-as-a-failure",[1835],{"type":26,"value":1836},"Example: treat an empty 200 as a failure",{"type":21,"tag":22,"props":1838,"children":1839},{},[1840,1842,1848,1850,1856],{"type":26,"value":1841},"Some endpoints answer ",{"type":21,"tag":101,"props":1843,"children":1845},{"className":1844},[],[1846],{"type":26,"value":1847},"200 OK",{"type":26,"value":1849}," but silently drop the payload. This catches that case in addition to ordinary 4xx/5xx/timeout failures, then alerts with structured detail. Set ",{"type":21,"tag":101,"props":1851,"children":1853},{"className":1852},[],[1854],{"type":26,"value":1855},"alert_webhook_url",{"type":26,"value":1857}," as a config variable.",{"type":21,"tag":735,"props":1859,"children":1860},{},[1861,2374],{"type":21,"tag":739,"props":1862,"children":1863},{"v-slot:javascript":7},[1864],{"type":21,"tag":311,"props":1865,"children":1867},{"className":744,"code":1866,"language":746,"meta":7,"style":7},"var hardFailure = r.responseStatus === 0 || r.responseStatus >= 400;\nvar emptyOk = r.responseStatus >= 200 && r.responseStatus \u003C 300 &&\n  (!r.responseBody || r.responseBody.trim() === \"\");\n\nif (hardFailure || emptyOk) {\n  var detail = hardFailure\n    ? (r.responseStatus === 0 ? r.error : (\"status \" + r.responseStatus))\n    : \"200 with an empty body\";\n\n  console.error(\"suspicious delivery to \" + r.metadata[\"output_name\"] + \": \" + detail);\n\n  var url = cfg.get(\"alert_webhook_url\");\n  if (url) {\n    http.post(url, JSON.stringify({\n      output: r.metadata[\"output_name\"],\n      destination: r.metadata[\"output_url\"],\n      status: r.responseStatus,\n      detail: detail\n    }), { headers: { \"Content-Type\": \"application/json\" } });\n  }\n}\n",[1868],{"type":21,"tag":101,"props":1869,"children":1870},{"__ignoreMap":7},[1871,1919,1972,2023,2030,2051,2072,2124,2140,2147,2202,2209,2245,2256,2287,2304,2321,2329,2337,2360,2367],{"type":21,"tag":321,"props":1872,"children":1873},{"class":323,"line":324},[1874,1878,1883,1887,1891,1895,1899,1903,1907,1911,1915],{"type":21,"tag":321,"props":1875,"children":1876},{"style":765},[1877],{"type":26,"value":768},{"type":21,"tag":321,"props":1879,"children":1880},{"style":771},[1881],{"type":26,"value":1882}," hardFailure ",{"type":21,"tag":321,"props":1884,"children":1885},{"style":765},[1886],{"type":26,"value":779},{"type":21,"tag":321,"props":1888,"children":1889},{"style":771},[1890],{"type":26,"value":784},{"type":21,"tag":321,"props":1892,"children":1893},{"style":765},[1894],{"type":26,"value":789},{"type":21,"tag":321,"props":1896,"children":1897},{"style":792},[1898],{"type":26,"value":795},{"type":21,"tag":321,"props":1900,"children":1901},{"style":765},[1902],{"type":26,"value":800},{"type":21,"tag":321,"props":1904,"children":1905},{"style":771},[1906],{"type":26,"value":784},{"type":21,"tag":321,"props":1908,"children":1909},{"style":765},[1910],{"type":26,"value":809},{"type":21,"tag":321,"props":1912,"children":1913},{"style":792},[1914],{"type":26,"value":814},{"type":21,"tag":321,"props":1916,"children":1917},{"style":771},[1918],{"type":26,"value":819},{"type":21,"tag":321,"props":1920,"children":1921},{"class":323,"line":333},[1922,1926,1931,1935,1939,1943,1948,1953,1957,1962,1967],{"type":21,"tag":321,"props":1923,"children":1924},{"style":765},[1925],{"type":26,"value":768},{"type":21,"tag":321,"props":1927,"children":1928},{"style":771},[1929],{"type":26,"value":1930}," emptyOk ",{"type":21,"tag":321,"props":1932,"children":1933},{"style":765},[1934],{"type":26,"value":779},{"type":21,"tag":321,"props":1936,"children":1937},{"style":771},[1938],{"type":26,"value":784},{"type":21,"tag":321,"props":1940,"children":1941},{"style":765},[1942],{"type":26,"value":809},{"type":21,"tag":321,"props":1944,"children":1945},{"style":792},[1946],{"type":26,"value":1947}," 200",{"type":21,"tag":321,"props":1949,"children":1950},{"style":765},[1951],{"type":26,"value":1952}," &&",{"type":21,"tag":321,"props":1954,"children":1955},{"style":771},[1956],{"type":26,"value":784},{"type":21,"tag":321,"props":1958,"children":1959},{"style":765},[1960],{"type":26,"value":1961},"\u003C",{"type":21,"tag":321,"props":1963,"children":1964},{"style":792},[1965],{"type":26,"value":1966}," 300",{"type":21,"tag":321,"props":1968,"children":1969},{"style":765},[1970],{"type":26,"value":1971}," &&\n",{"type":21,"tag":321,"props":1973,"children":1974},{"class":323,"line":342},[1975,1980,1985,1990,1995,2000,2005,2010,2014,2019],{"type":21,"tag":321,"props":1976,"children":1977},{"style":771},[1978],{"type":26,"value":1979},"  (",{"type":21,"tag":321,"props":1981,"children":1982},{"style":765},[1983],{"type":26,"value":1984},"!",{"type":21,"tag":321,"props":1986,"children":1987},{"style":771},[1988],{"type":26,"value":1989},"r.responseBody ",{"type":21,"tag":321,"props":1991,"children":1992},{"style":765},[1993],{"type":26,"value":1994},"||",{"type":21,"tag":321,"props":1996,"children":1997},{"style":771},[1998],{"type":26,"value":1999}," r.responseBody.",{"type":21,"tag":321,"props":2001,"children":2002},{"style":951},[2003],{"type":26,"value":2004},"trim",{"type":21,"tag":321,"props":2006,"children":2007},{"style":771},[2008],{"type":26,"value":2009},"() ",{"type":21,"tag":321,"props":2011,"children":2012},{"style":765},[2013],{"type":26,"value":789},{"type":21,"tag":321,"props":2015,"children":2016},{"style":887},[2017],{"type":26,"value":2018}," \"\"",{"type":21,"tag":321,"props":2020,"children":2021},{"style":771},[2022],{"type":26,"value":1051},{"type":21,"tag":321,"props":2024,"children":2025},{"class":323,"line":351},[2026],{"type":21,"tag":321,"props":2027,"children":2028},{"emptyLinePlaceholder":825},[2029],{"type":26,"value":828},{"type":21,"tag":321,"props":2031,"children":2032},{"class":323,"line":360},[2033,2037,2042,2046],{"type":21,"tag":321,"props":2034,"children":2035},{"style":765},[2036],{"type":26,"value":836},{"type":21,"tag":321,"props":2038,"children":2039},{"style":771},[2040],{"type":26,"value":2041}," (hardFailure ",{"type":21,"tag":321,"props":2043,"children":2044},{"style":765},[2045],{"type":26,"value":1994},{"type":21,"tag":321,"props":2047,"children":2048},{"style":771},[2049],{"type":26,"value":2050}," emptyOk) {\n",{"type":21,"tag":321,"props":2052,"children":2053},{"class":323,"line":369},[2054,2058,2063,2067],{"type":21,"tag":321,"props":2055,"children":2056},{"style":765},[2057],{"type":26,"value":849},{"type":21,"tag":321,"props":2059,"children":2060},{"style":771},[2061],{"type":26,"value":2062}," detail ",{"type":21,"tag":321,"props":2064,"children":2065},{"style":765},[2066],{"type":26,"value":779},{"type":21,"tag":321,"props":2068,"children":2069},{"style":771},[2070],{"type":26,"value":2071}," hardFailure\n",{"type":21,"tag":321,"props":2073,"children":2074},{"class":323,"line":378},[2075,2079,2084,2088,2092,2097,2102,2106,2110,2115,2119],{"type":21,"tag":321,"props":2076,"children":2077},{"style":765},[2078],{"type":26,"value":879},{"type":21,"tag":321,"props":2080,"children":2081},{"style":771},[2082],{"type":26,"value":2083}," (r.responseStatus ",{"type":21,"tag":321,"props":2085,"children":2086},{"style":765},[2087],{"type":26,"value":789},{"type":21,"tag":321,"props":2089,"children":2090},{"style":792},[2091],{"type":26,"value":795},{"type":21,"tag":321,"props":2093,"children":2094},{"style":765},[2095],{"type":26,"value":2096}," ?",{"type":21,"tag":321,"props":2098,"children":2099},{"style":771},[2100],{"type":26,"value":2101}," r.error ",{"type":21,"tag":321,"props":2103,"children":2104},{"style":765},[2105],{"type":26,"value":1676},{"type":21,"tag":321,"props":2107,"children":2108},{"style":771},[2109],{"type":26,"value":884},{"type":21,"tag":321,"props":2111,"children":2112},{"style":887},[2113],{"type":26,"value":2114},"\"status \"",{"type":21,"tag":321,"props":2116,"children":2117},{"style":765},[2118],{"type":26,"value":895},{"type":21,"tag":321,"props":2120,"children":2121},{"style":771},[2122],{"type":26,"value":2123}," r.responseStatus))\n",{"type":21,"tag":321,"props":2125,"children":2126},{"class":323,"line":934},[2127,2131,2136],{"type":21,"tag":321,"props":2128,"children":2129},{"style":765},[2130],{"type":26,"value":913},{"type":21,"tag":321,"props":2132,"children":2133},{"style":887},[2134],{"type":26,"value":2135}," \"200 with an empty body\"",{"type":21,"tag":321,"props":2137,"children":2138},{"style":771},[2139],{"type":26,"value":819},{"type":21,"tag":321,"props":2141,"children":2142},{"class":323,"line":942},[2143],{"type":21,"tag":321,"props":2144,"children":2145},{"emptyLinePlaceholder":825},[2146],{"type":26,"value":828},{"type":21,"tag":321,"props":2148,"children":2149},{"class":323,"line":1005},[2150,2154,2159,2163,2168,2172,2176,2180,2184,2188,2193,2197],{"type":21,"tag":321,"props":2151,"children":2152},{"style":771},[2153],{"type":26,"value":948},{"type":21,"tag":321,"props":2155,"children":2156},{"style":951},[2157],{"type":26,"value":2158},"error",{"type":21,"tag":321,"props":2160,"children":2161},{"style":771},[2162],{"type":26,"value":959},{"type":21,"tag":321,"props":2164,"children":2165},{"style":887},[2166],{"type":26,"value":2167},"\"suspicious delivery to \"",{"type":21,"tag":321,"props":2169,"children":2170},{"style":765},[2171],{"type":26,"value":895},{"type":21,"tag":321,"props":2173,"children":2174},{"style":771},[2175],{"type":26,"value":973},{"type":21,"tag":321,"props":2177,"children":2178},{"style":887},[2179],{"type":26,"value":978},{"type":21,"tag":321,"props":2181,"children":2182},{"style":771},[2183],{"type":26,"value":983},{"type":21,"tag":321,"props":2185,"children":2186},{"style":765},[2187],{"type":26,"value":988},{"type":21,"tag":321,"props":2189,"children":2190},{"style":887},[2191],{"type":26,"value":2192}," \": \"",{"type":21,"tag":321,"props":2194,"children":2195},{"style":765},[2196],{"type":26,"value":895},{"type":21,"tag":321,"props":2198,"children":2199},{"style":771},[2200],{"type":26,"value":2201}," detail);\n",{"type":21,"tag":321,"props":2203,"children":2204},{"class":323,"line":1013},[2205],{"type":21,"tag":321,"props":2206,"children":2207},{"emptyLinePlaceholder":825},[2208],{"type":26,"value":828},{"type":21,"tag":321,"props":2210,"children":2211},{"class":323,"line":1054},[2212,2216,2220,2224,2228,2232,2236,2241],{"type":21,"tag":321,"props":2213,"children":2214},{"style":765},[2215],{"type":26,"value":849},{"type":21,"tag":321,"props":2217,"children":2218},{"style":771},[2219],{"type":26,"value":1023},{"type":21,"tag":321,"props":2221,"children":2222},{"style":765},[2223],{"type":26,"value":779},{"type":21,"tag":321,"props":2225,"children":2226},{"style":771},[2227],{"type":26,"value":1032},{"type":21,"tag":321,"props":2229,"children":2230},{"style":951},[2231],{"type":26,"value":1037},{"type":21,"tag":321,"props":2233,"children":2234},{"style":771},[2235],{"type":26,"value":959},{"type":21,"tag":321,"props":2237,"children":2238},{"style":887},[2239],{"type":26,"value":2240},"\"alert_webhook_url\"",{"type":21,"tag":321,"props":2242,"children":2243},{"style":771},[2244],{"type":26,"value":1051},{"type":21,"tag":321,"props":2246,"children":2247},{"class":323,"line":1068},[2248,2252],{"type":21,"tag":321,"props":2249,"children":2250},{"style":765},[2251],{"type":26,"value":1060},{"type":21,"tag":321,"props":2253,"children":2254},{"style":771},[2255],{"type":26,"value":1065},{"type":21,"tag":321,"props":2257,"children":2258},{"class":323,"line":1106},[2259,2263,2267,2271,2275,2279,2283],{"type":21,"tag":321,"props":2260,"children":2261},{"style":771},[2262],{"type":26,"value":1074},{"type":21,"tag":321,"props":2264,"children":2265},{"style":951},[2266],{"type":26,"value":1079},{"type":21,"tag":321,"props":2268,"children":2269},{"style":771},[2270],{"type":26,"value":1084},{"type":21,"tag":321,"props":2272,"children":2273},{"style":792},[2274],{"type":26,"value":1089},{"type":21,"tag":321,"props":2276,"children":2277},{"style":771},[2278],{"type":26,"value":69},{"type":21,"tag":321,"props":2280,"children":2281},{"style":951},[2282],{"type":26,"value":1098},{"type":21,"tag":321,"props":2284,"children":2285},{"style":771},[2286],{"type":26,"value":1103},{"type":21,"tag":321,"props":2288,"children":2289},{"class":323,"line":1154},[2290,2295,2299],{"type":21,"tag":321,"props":2291,"children":2292},{"style":771},[2293],{"type":26,"value":2294},"      output: r.metadata[",{"type":21,"tag":321,"props":2296,"children":2297},{"style":887},[2298],{"type":26,"value":978},{"type":21,"tag":321,"props":2300,"children":2301},{"style":771},[2302],{"type":26,"value":2303},"],\n",{"type":21,"tag":321,"props":2305,"children":2306},{"class":323,"line":1183},[2307,2312,2317],{"type":21,"tag":321,"props":2308,"children":2309},{"style":771},[2310],{"type":26,"value":2311},"      destination: r.metadata[",{"type":21,"tag":321,"props":2313,"children":2314},{"style":887},[2315],{"type":26,"value":2316},"\"output_url\"",{"type":21,"tag":321,"props":2318,"children":2319},{"style":771},[2320],{"type":26,"value":2303},{"type":21,"tag":321,"props":2322,"children":2323},{"class":323,"line":1192},[2324],{"type":21,"tag":321,"props":2325,"children":2326},{"style":771},[2327],{"type":26,"value":2328},"      status: r.responseStatus,\n",{"type":21,"tag":321,"props":2330,"children":2331},{"class":323,"line":1696},[2332],{"type":21,"tag":321,"props":2333,"children":2334},{"style":771},[2335],{"type":26,"value":2336},"      detail: detail\n",{"type":21,"tag":321,"props":2338,"children":2339},{"class":323,"line":1722},[2340,2344,2348,2352,2356],{"type":21,"tag":321,"props":2341,"children":2342},{"style":771},[2343],{"type":26,"value":1160},{"type":21,"tag":321,"props":2345,"children":2346},{"style":887},[2347],{"type":26,"value":1165},{"type":21,"tag":321,"props":2349,"children":2350},{"style":771},[2351],{"type":26,"value":1170},{"type":21,"tag":321,"props":2353,"children":2354},{"style":887},[2355],{"type":26,"value":1175},{"type":21,"tag":321,"props":2357,"children":2358},{"style":771},[2359],{"type":26,"value":1180},{"type":21,"tag":321,"props":2361,"children":2362},{"class":323,"line":1749},[2363],{"type":21,"tag":321,"props":2364,"children":2365},{"style":771},[2366],{"type":26,"value":1189},{"type":21,"tag":321,"props":2368,"children":2369},{"class":323,"line":1789},[2370],{"type":21,"tag":321,"props":2371,"children":2372},{"style":771},[2373],{"type":26,"value":384},{"type":21,"tag":739,"props":2375,"children":2376},{"v-slot:lua":7},[2377],{"type":21,"tag":311,"props":2378,"children":2380},{"className":1203,"code":2379,"language":1205,"meta":7,"style":7},"local http = require(\"http\")\nlocal json = require(\"json\")\n\nlocal hard_failure = r.ResponseStatus == 0 or r.ResponseStatus >= 400\nlocal empty_ok = r.ResponseStatus >= 200 and r.ResponseStatus \u003C 300\n  and (r.ResponseBody == nil or r.ResponseBody == \"\")\n\nif hard_failure or empty_ok then\n  local detail = hard_failure\n    and (r.ResponseStatus == 0 and r.DeliveryError or (\"status \" .. r.ResponseStatus))\n    or \"200 with an empty body\"\n\n  local payload, err = json.encode({\n    output = r.metadata[\"output_name\"] or \"output\",\n    destination = r.metadata[\"output_url\"] or \"\",\n    status = r.ResponseStatus,\n    detail = detail\n  })\n  if err then error(err) end\n\n  local url = cfg:GetValue(\"alert_webhook_url\")\n  if url ~= \"\" then\n    http.request(\"POST\", url, {\n      headers = { [\"Content-Type\"] = \"application/json\" },\n      body = payload\n    })\n  end\nend\n",[2381],{"type":21,"tag":101,"props":2382,"children":2383},{"__ignoreMap":7},[2384,2415,2446,2453,2505,2560,2610,2617,2640,2660,2725,2737,2744,2771,2817,2861,2885,2902,2909,2936,2943,2982,3005,3028,3063,3079,3087,3095],{"type":21,"tag":321,"props":2385,"children":2386},{"class":323,"line":324},[2387,2391,2395,2399,2403,2407,2411],{"type":21,"tag":321,"props":2388,"children":2389},{"style":765},[2390],{"type":26,"value":1225},{"type":21,"tag":321,"props":2392,"children":2393},{"style":771},[2394],{"type":26,"value":1230},{"type":21,"tag":321,"props":2396,"children":2397},{"style":765},[2398],{"type":26,"value":779},{"type":21,"tag":321,"props":2400,"children":2401},{"style":792},[2402],{"type":26,"value":1239},{"type":21,"tag":321,"props":2404,"children":2405},{"style":771},[2406],{"type":26,"value":959},{"type":21,"tag":321,"props":2408,"children":2409},{"style":887},[2410],{"type":26,"value":1248},{"type":21,"tag":321,"props":2412,"children":2413},{"style":771},[2414],{"type":26,"value":1253},{"type":21,"tag":321,"props":2416,"children":2417},{"class":323,"line":333},[2418,2422,2426,2430,2434,2438,2442],{"type":21,"tag":321,"props":2419,"children":2420},{"style":765},[2421],{"type":26,"value":1225},{"type":21,"tag":321,"props":2423,"children":2424},{"style":771},[2425],{"type":26,"value":1265},{"type":21,"tag":321,"props":2427,"children":2428},{"style":765},[2429],{"type":26,"value":779},{"type":21,"tag":321,"props":2431,"children":2432},{"style":792},[2433],{"type":26,"value":1239},{"type":21,"tag":321,"props":2435,"children":2436},{"style":771},[2437],{"type":26,"value":959},{"type":21,"tag":321,"props":2439,"children":2440},{"style":887},[2441],{"type":26,"value":1282},{"type":21,"tag":321,"props":2443,"children":2444},{"style":771},[2445],{"type":26,"value":1253},{"type":21,"tag":321,"props":2447,"children":2448},{"class":323,"line":342},[2449],{"type":21,"tag":321,"props":2450,"children":2451},{"emptyLinePlaceholder":825},[2452],{"type":26,"value":828},{"type":21,"tag":321,"props":2454,"children":2455},{"class":323,"line":351},[2456,2460,2465,2469,2473,2477,2481,2485,2489,2493,2497,2501],{"type":21,"tag":321,"props":2457,"children":2458},{"style":765},[2459],{"type":26,"value":1225},{"type":21,"tag":321,"props":2461,"children":2462},{"style":771},[2463],{"type":26,"value":2464}," hard_failure ",{"type":21,"tag":321,"props":2466,"children":2467},{"style":765},[2468],{"type":26,"value":779},{"type":21,"tag":321,"props":2470,"children":2471},{"style":771},[2472],{"type":26,"value":1313},{"type":21,"tag":321,"props":2474,"children":2475},{"style":951},[2476],{"type":26,"value":1318},{"type":21,"tag":321,"props":2478,"children":2479},{"style":765},[2480],{"type":26,"value":1323},{"type":21,"tag":321,"props":2482,"children":2483},{"style":792},[2484],{"type":26,"value":795},{"type":21,"tag":321,"props":2486,"children":2487},{"style":765},[2488],{"type":26,"value":1332},{"type":21,"tag":321,"props":2490,"children":2491},{"style":771},[2492],{"type":26,"value":1313},{"type":21,"tag":321,"props":2494,"children":2495},{"style":951},[2496],{"type":26,"value":1318},{"type":21,"tag":321,"props":2498,"children":2499},{"style":765},[2500],{"type":26,"value":1345},{"type":21,"tag":321,"props":2502,"children":2503},{"style":792},[2504],{"type":26,"value":1350},{"type":21,"tag":321,"props":2506,"children":2507},{"class":323,"line":360},[2508,2512,2517,2521,2525,2529,2533,2537,2542,2546,2550,2555],{"type":21,"tag":321,"props":2509,"children":2510},{"style":765},[2511],{"type":26,"value":1225},{"type":21,"tag":321,"props":2513,"children":2514},{"style":771},[2515],{"type":26,"value":2516}," empty_ok ",{"type":21,"tag":321,"props":2518,"children":2519},{"style":765},[2520],{"type":26,"value":779},{"type":21,"tag":321,"props":2522,"children":2523},{"style":771},[2524],{"type":26,"value":1313},{"type":21,"tag":321,"props":2526,"children":2527},{"style":951},[2528],{"type":26,"value":1318},{"type":21,"tag":321,"props":2530,"children":2531},{"style":765},[2532],{"type":26,"value":1345},{"type":21,"tag":321,"props":2534,"children":2535},{"style":792},[2536],{"type":26,"value":1947},{"type":21,"tag":321,"props":2538,"children":2539},{"style":765},[2540],{"type":26,"value":2541}," and",{"type":21,"tag":321,"props":2543,"children":2544},{"style":771},[2545],{"type":26,"value":1313},{"type":21,"tag":321,"props":2547,"children":2548},{"style":951},[2549],{"type":26,"value":1318},{"type":21,"tag":321,"props":2551,"children":2552},{"style":765},[2553],{"type":26,"value":2554}," \u003C",{"type":21,"tag":321,"props":2556,"children":2557},{"style":792},[2558],{"type":26,"value":2559}," 300\n",{"type":21,"tag":321,"props":2561,"children":2562},{"class":323,"line":369},[2563,2568,2572,2577,2581,2586,2590,2594,2598,2602,2606],{"type":21,"tag":321,"props":2564,"children":2565},{"style":765},[2566],{"type":26,"value":2567},"  and",{"type":21,"tag":321,"props":2569,"children":2570},{"style":771},[2571],{"type":26,"value":1387},{"type":21,"tag":321,"props":2573,"children":2574},{"style":951},[2575],{"type":26,"value":2576},"ResponseBody",{"type":21,"tag":321,"props":2578,"children":2579},{"style":765},[2580],{"type":26,"value":1323},{"type":21,"tag":321,"props":2582,"children":2583},{"style":792},[2584],{"type":26,"value":2585}," nil",{"type":21,"tag":321,"props":2587,"children":2588},{"style":765},[2589],{"type":26,"value":1332},{"type":21,"tag":321,"props":2591,"children":2592},{"style":771},[2593],{"type":26,"value":1313},{"type":21,"tag":321,"props":2595,"children":2596},{"style":951},[2597],{"type":26,"value":2576},{"type":21,"tag":321,"props":2599,"children":2600},{"style":765},[2601],{"type":26,"value":1323},{"type":21,"tag":321,"props":2603,"children":2604},{"style":887},[2605],{"type":26,"value":2018},{"type":21,"tag":321,"props":2607,"children":2608},{"style":771},[2609],{"type":26,"value":1253},{"type":21,"tag":321,"props":2611,"children":2612},{"class":323,"line":378},[2613],{"type":21,"tag":321,"props":2614,"children":2615},{"emptyLinePlaceholder":825},[2616],{"type":26,"value":828},{"type":21,"tag":321,"props":2618,"children":2619},{"class":323,"line":934},[2620,2624,2628,2632,2636],{"type":21,"tag":321,"props":2621,"children":2622},{"style":765},[2623],{"type":26,"value":836},{"type":21,"tag":321,"props":2625,"children":2626},{"style":771},[2627],{"type":26,"value":2464},{"type":21,"tag":321,"props":2629,"children":2630},{"style":765},[2631],{"type":26,"value":1527},{"type":21,"tag":321,"props":2633,"children":2634},{"style":771},[2635],{"type":26,"value":2516},{"type":21,"tag":321,"props":2637,"children":2638},{"style":765},[2639],{"type":26,"value":1366},{"type":21,"tag":321,"props":2641,"children":2642},{"class":323,"line":942},[2643,2647,2651,2655],{"type":21,"tag":321,"props":2644,"children":2645},{"style":765},[2646],{"type":26,"value":1374},{"type":21,"tag":321,"props":2648,"children":2649},{"style":771},[2650],{"type":26,"value":2062},{"type":21,"tag":321,"props":2652,"children":2653},{"style":765},[2654],{"type":26,"value":779},{"type":21,"tag":321,"props":2656,"children":2657},{"style":771},[2658],{"type":26,"value":2659}," hard_failure\n",{"type":21,"tag":321,"props":2661,"children":2662},{"class":323,"line":1005},[2663,2667,2671,2675,2679,2683,2687,2691,2695,2699,2703,2708,2712,2716,2720],{"type":21,"tag":321,"props":2664,"children":2665},{"style":765},[2666],{"type":26,"value":1411},{"type":21,"tag":321,"props":2668,"children":2669},{"style":771},[2670],{"type":26,"value":1387},{"type":21,"tag":321,"props":2672,"children":2673},{"style":951},[2674],{"type":26,"value":1318},{"type":21,"tag":321,"props":2676,"children":2677},{"style":765},[2678],{"type":26,"value":1323},{"type":21,"tag":321,"props":2680,"children":2681},{"style":792},[2682],{"type":26,"value":795},{"type":21,"tag":321,"props":2684,"children":2685},{"style":765},[2686],{"type":26,"value":2541},{"type":21,"tag":321,"props":2688,"children":2689},{"style":771},[2690],{"type":26,"value":1313},{"type":21,"tag":321,"props":2692,"children":2693},{"style":951},[2694],{"type":26,"value":1434},{"type":21,"tag":321,"props":2696,"children":2697},{"style":765},[2698],{"type":26,"value":1332},{"type":21,"tag":321,"props":2700,"children":2701},{"style":771},[2702],{"type":26,"value":884},{"type":21,"tag":321,"props":2704,"children":2705},{"style":887},[2706],{"type":26,"value":2707},"\"status \" ",{"type":21,"tag":321,"props":2709,"children":2710},{"style":765},[2711],{"type":26,"value":1425},{"type":21,"tag":321,"props":2713,"children":2714},{"style":771},[2715],{"type":26,"value":1313},{"type":21,"tag":321,"props":2717,"children":2718},{"style":951},[2719],{"type":26,"value":1318},{"type":21,"tag":321,"props":2721,"children":2722},{"style":771},[2723],{"type":26,"value":2724},"))\n",{"type":21,"tag":321,"props":2726,"children":2727},{"class":323,"line":1013},[2728,2732],{"type":21,"tag":321,"props":2729,"children":2730},{"style":765},[2731],{"type":26,"value":1452},{"type":21,"tag":321,"props":2733,"children":2734},{"style":887},[2735],{"type":26,"value":2736}," \"200 with an empty body\"\n",{"type":21,"tag":321,"props":2738,"children":2739},{"class":323,"line":1054},[2740],{"type":21,"tag":321,"props":2741,"children":2742},{"emptyLinePlaceholder":825},[2743],{"type":26,"value":828},{"type":21,"tag":321,"props":2745,"children":2746},{"class":323,"line":1068},[2747,2751,2755,2759,2763,2767],{"type":21,"tag":321,"props":2748,"children":2749},{"style":765},[2750],{"type":26,"value":1374},{"type":21,"tag":321,"props":2752,"children":2753},{"style":771},[2754],{"type":26,"value":1544},{"type":21,"tag":321,"props":2756,"children":2757},{"style":765},[2758],{"type":26,"value":779},{"type":21,"tag":321,"props":2760,"children":2761},{"style":771},[2762],{"type":26,"value":1553},{"type":21,"tag":321,"props":2764,"children":2765},{"style":792},[2766],{"type":26,"value":1558},{"type":21,"tag":321,"props":2768,"children":2769},{"style":771},[2770],{"type":26,"value":1103},{"type":21,"tag":321,"props":2772,"children":2773},{"class":323,"line":1106},[2774,2779,2783,2787,2791,2795,2799,2803,2807,2812],{"type":21,"tag":321,"props":2775,"children":2776},{"style":771},[2777],{"type":26,"value":2778},"    output ",{"type":21,"tag":321,"props":2780,"children":2781},{"style":765},[2782],{"type":26,"value":779},{"type":21,"tag":321,"props":2784,"children":2785},{"style":771},[2786],{"type":26,"value":1313},{"type":21,"tag":321,"props":2788,"children":2789},{"style":951},[2790],{"type":26,"value":1509},{"type":21,"tag":321,"props":2792,"children":2793},{"style":771},[2794],{"type":26,"value":1514},{"type":21,"tag":321,"props":2796,"children":2797},{"style":887},[2798],{"type":26,"value":978},{"type":21,"tag":321,"props":2800,"children":2801},{"style":771},[2802],{"type":26,"value":983},{"type":21,"tag":321,"props":2804,"children":2805},{"style":765},[2806],{"type":26,"value":1527},{"type":21,"tag":321,"props":2808,"children":2809},{"style":887},[2810],{"type":26,"value":2811}," \"output\"",{"type":21,"tag":321,"props":2813,"children":2814},{"style":771},[2815],{"type":26,"value":2816},",\n",{"type":21,"tag":321,"props":2818,"children":2819},{"class":323,"line":1154},[2820,2825,2829,2833,2837,2841,2845,2849,2853,2857],{"type":21,"tag":321,"props":2821,"children":2822},{"style":771},[2823],{"type":26,"value":2824},"    destination ",{"type":21,"tag":321,"props":2826,"children":2827},{"style":765},[2828],{"type":26,"value":779},{"type":21,"tag":321,"props":2830,"children":2831},{"style":771},[2832],{"type":26,"value":1313},{"type":21,"tag":321,"props":2834,"children":2835},{"style":951},[2836],{"type":26,"value":1509},{"type":21,"tag":321,"props":2838,"children":2839},{"style":771},[2840],{"type":26,"value":1514},{"type":21,"tag":321,"props":2842,"children":2843},{"style":887},[2844],{"type":26,"value":2316},{"type":21,"tag":321,"props":2846,"children":2847},{"style":771},[2848],{"type":26,"value":983},{"type":21,"tag":321,"props":2850,"children":2851},{"style":765},[2852],{"type":26,"value":1527},{"type":21,"tag":321,"props":2854,"children":2855},{"style":887},[2856],{"type":26,"value":2018},{"type":21,"tag":321,"props":2858,"children":2859},{"style":771},[2860],{"type":26,"value":2816},{"type":21,"tag":321,"props":2862,"children":2863},{"class":323,"line":1183},[2864,2869,2873,2877,2881],{"type":21,"tag":321,"props":2865,"children":2866},{"style":771},[2867],{"type":26,"value":2868},"    status ",{"type":21,"tag":321,"props":2870,"children":2871},{"style":765},[2872],{"type":26,"value":779},{"type":21,"tag":321,"props":2874,"children":2875},{"style":771},[2876],{"type":26,"value":1313},{"type":21,"tag":321,"props":2878,"children":2879},{"style":951},[2880],{"type":26,"value":1318},{"type":21,"tag":321,"props":2882,"children":2883},{"style":771},[2884],{"type":26,"value":2816},{"type":21,"tag":321,"props":2886,"children":2887},{"class":323,"line":1192},[2888,2893,2897],{"type":21,"tag":321,"props":2889,"children":2890},{"style":771},[2891],{"type":26,"value":2892},"    detail ",{"type":21,"tag":321,"props":2894,"children":2895},{"style":765},[2896],{"type":26,"value":779},{"type":21,"tag":321,"props":2898,"children":2899},{"style":771},[2900],{"type":26,"value":2901}," detail\n",{"type":21,"tag":321,"props":2903,"children":2904},{"class":323,"line":1696},[2905],{"type":21,"tag":321,"props":2906,"children":2907},{"style":771},[2908],{"type":26,"value":1612},{"type":21,"tag":321,"props":2910,"children":2911},{"class":323,"line":1722},[2912,2916,2920,2924,2928,2932],{"type":21,"tag":321,"props":2913,"children":2914},{"style":765},[2915],{"type":26,"value":1060},{"type":21,"tag":321,"props":2917,"children":2918},{"style":771},[2919],{"type":26,"value":1624},{"type":21,"tag":321,"props":2921,"children":2922},{"style":765},[2923],{"type":26,"value":1629},{"type":21,"tag":321,"props":2925,"children":2926},{"style":792},[2927],{"type":26,"value":1634},{"type":21,"tag":321,"props":2929,"children":2930},{"style":771},[2931],{"type":26,"value":1639},{"type":21,"tag":321,"props":2933,"children":2934},{"style":765},[2935],{"type":26,"value":1644},{"type":21,"tag":321,"props":2937,"children":2938},{"class":323,"line":1749},[2939],{"type":21,"tag":321,"props":2940,"children":2941},{"emptyLinePlaceholder":825},[2942],{"type":26,"value":828},{"type":21,"tag":321,"props":2944,"children":2945},{"class":323,"line":1789},[2946,2950,2954,2958,2962,2966,2970,2974,2978],{"type":21,"tag":321,"props":2947,"children":2948},{"style":765},[2949],{"type":26,"value":1374},{"type":21,"tag":321,"props":2951,"children":2952},{"style":771},[2953],{"type":26,"value":1023},{"type":21,"tag":321,"props":2955,"children":2956},{"style":765},[2957],{"type":26,"value":779},{"type":21,"tag":321,"props":2959,"children":2960},{"style":951},[2961],{"type":26,"value":1671},{"type":21,"tag":321,"props":2963,"children":2964},{"style":771},[2965],{"type":26,"value":1676},{"type":21,"tag":321,"props":2967,"children":2968},{"style":792},[2969],{"type":26,"value":1681},{"type":21,"tag":321,"props":2971,"children":2972},{"style":771},[2973],{"type":26,"value":959},{"type":21,"tag":321,"props":2975,"children":2976},{"style":887},[2977],{"type":26,"value":2240},{"type":21,"tag":321,"props":2979,"children":2980},{"style":771},[2981],{"type":26,"value":1253},{"type":21,"tag":321,"props":2983,"children":2984},{"class":323,"line":1807},[2985,2989,2993,2997,3001],{"type":21,"tag":321,"props":2986,"children":2987},{"style":765},[2988],{"type":26,"value":1060},{"type":21,"tag":321,"props":2990,"children":2991},{"style":771},[2992],{"type":26,"value":1023},{"type":21,"tag":321,"props":2994,"children":2995},{"style":765},[2996],{"type":26,"value":1710},{"type":21,"tag":321,"props":2998,"children":2999},{"style":887},[3000],{"type":26,"value":1715},{"type":21,"tag":321,"props":3002,"children":3003},{"style":765},[3004],{"type":26,"value":1366},{"type":21,"tag":321,"props":3006,"children":3007},{"class":323,"line":1816},[3008,3012,3016,3020,3024],{"type":21,"tag":321,"props":3009,"children":3010},{"style":771},[3011],{"type":26,"value":1074},{"type":21,"tag":321,"props":3013,"children":3014},{"style":792},[3015],{"type":26,"value":1732},{"type":21,"tag":321,"props":3017,"children":3018},{"style":771},[3019],{"type":26,"value":959},{"type":21,"tag":321,"props":3021,"children":3022},{"style":887},[3023],{"type":26,"value":1741},{"type":21,"tag":321,"props":3025,"children":3026},{"style":771},[3027],{"type":26,"value":1746},{"type":21,"tag":321,"props":3029,"children":3030},{"class":323,"line":1825},[3031,3035,3039,3043,3047,3051,3055,3059],{"type":21,"tag":321,"props":3032,"children":3033},{"style":771},[3034],{"type":26,"value":1755},{"type":21,"tag":321,"props":3036,"children":3037},{"style":765},[3038],{"type":26,"value":779},{"type":21,"tag":321,"props":3040,"children":3041},{"style":771},[3042],{"type":26,"value":1764},{"type":21,"tag":321,"props":3044,"children":3045},{"style":887},[3046],{"type":26,"value":1165},{"type":21,"tag":321,"props":3048,"children":3049},{"style":771},[3050],{"type":26,"value":983},{"type":21,"tag":321,"props":3052,"children":3053},{"style":765},[3054],{"type":26,"value":779},{"type":21,"tag":321,"props":3056,"children":3057},{"style":887},[3058],{"type":26,"value":1781},{"type":21,"tag":321,"props":3060,"children":3061},{"style":771},[3062],{"type":26,"value":1786},{"type":21,"tag":321,"props":3064,"children":3066},{"class":323,"line":3065},25,[3067,3071,3075],{"type":21,"tag":321,"props":3068,"children":3069},{"style":771},[3070],{"type":26,"value":1795},{"type":21,"tag":321,"props":3072,"children":3073},{"style":765},[3074],{"type":26,"value":779},{"type":21,"tag":321,"props":3076,"children":3077},{"style":771},[3078],{"type":26,"value":1804},{"type":21,"tag":321,"props":3080,"children":3082},{"class":323,"line":3081},26,[3083],{"type":21,"tag":321,"props":3084,"children":3085},{"style":771},[3086],{"type":26,"value":1813},{"type":21,"tag":321,"props":3088,"children":3090},{"class":323,"line":3089},27,[3091],{"type":21,"tag":321,"props":3092,"children":3093},{"style":765},[3094],{"type":26,"value":1822},{"type":21,"tag":321,"props":3096,"children":3098},{"class":323,"line":3097},28,[3099],{"type":21,"tag":321,"props":3100,"children":3101},{"style":765},[3102],{"type":26,"value":1644},{"type":21,"tag":177,"props":3104,"children":3106},{"id":3105},"rewriting-the-recorded-response",[3107],{"type":26,"value":173},{"type":21,"tag":22,"props":3109,"children":3110},{},[3111,3113,3117,3119,3124,3126,3132],{"type":26,"value":3112},"A response function can override the status code, body, and headers that get ",{"type":21,"tag":29,"props":3114,"children":3115},{},[3116],{"type":26,"value":164},{"type":26,"value":3118}," to the webhook log. This does ",{"type":21,"tag":29,"props":3120,"children":3121},{},[3122],{"type":26,"value":3123},"not",{"type":26,"value":3125}," change what was already returned to the sender — the webhook is already delivered — but the recorded delivery status is recomputed from the (possibly overridden) status code. Use it to mark a delivery failed when the destination answered ",{"type":21,"tag":101,"props":3127,"children":3129},{"className":3128},[],[3130],{"type":26,"value":3131},"2xx",{"type":26,"value":3133}," but the payload says otherwise, so the log and dashboard show it as failed and your failure alerts fire.",{"type":21,"tag":22,"props":3135,"children":3136},{},[3137],{"type":26,"value":3138},"It uses the same mutators the request/transform functions use:",{"type":21,"tag":210,"props":3140,"children":3141},{},[3142,3161],{"type":21,"tag":214,"props":3143,"children":3144},{},[3145],{"type":21,"tag":218,"props":3146,"children":3147},{},[3148,3152,3156],{"type":21,"tag":222,"props":3149,"children":3150},{},[3151],{"type":26,"value":482},{"type":21,"tag":222,"props":3153,"children":3154},{},[3155],{"type":26,"value":487},{"type":21,"tag":222,"props":3157,"children":3158},{},[3159],{"type":26,"value":3160},"Effect",{"type":21,"tag":238,"props":3162,"children":3163},{},[3164,3190,3216],{"type":21,"tag":218,"props":3165,"children":3166},{},[3167,3176,3185],{"type":21,"tag":245,"props":3168,"children":3169},{},[3170],{"type":21,"tag":101,"props":3171,"children":3173},{"className":3172},[],[3174],{"type":26,"value":3175},"r.setResponseStatus(code)",{"type":21,"tag":245,"props":3177,"children":3178},{},[3179],{"type":21,"tag":101,"props":3180,"children":3182},{"className":3181},[],[3183],{"type":26,"value":3184},"r:SetResponseStatusCode(code)",{"type":21,"tag":245,"props":3186,"children":3187},{},[3188],{"type":26,"value":3189},"overrides the recorded status code (a 5xx marks the delivery failed)",{"type":21,"tag":218,"props":3191,"children":3192},{},[3193,3202,3211],{"type":21,"tag":245,"props":3194,"children":3195},{},[3196],{"type":21,"tag":101,"props":3197,"children":3199},{"className":3198},[],[3200],{"type":26,"value":3201},"r.setResponseBody(s)",{"type":21,"tag":245,"props":3203,"children":3204},{},[3205],{"type":21,"tag":101,"props":3206,"children":3208},{"className":3207},[],[3209],{"type":26,"value":3210},"r:SetResponseBody(s)",{"type":21,"tag":245,"props":3212,"children":3213},{},[3214],{"type":26,"value":3215},"overrides the recorded response body",{"type":21,"tag":218,"props":3217,"children":3218},{},[3219,3228,3237],{"type":21,"tag":245,"props":3220,"children":3221},{},[3222],{"type":21,"tag":101,"props":3223,"children":3225},{"className":3224},[],[3226],{"type":26,"value":3227},"r.setResponseHeader(k, v)",{"type":21,"tag":245,"props":3229,"children":3230},{},[3231],{"type":21,"tag":101,"props":3232,"children":3234},{"className":3233},[],[3235],{"type":26,"value":3236},"r:SetResponseHeader(k, v)",{"type":21,"tag":245,"props":3238,"children":3239},{},[3240],{"type":26,"value":3241},"overrides/adds a recorded response header",{"type":21,"tag":22,"props":3243,"children":3244},{},[3245],{"type":26,"value":3246},"Only the fields you set change; the rest of the destination's response is preserved.",{"type":21,"tag":22,"props":3248,"children":3249},{},[3250,3252,3257,3259,3264,3266,3272],{"type":26,"value":3251},"This example flags a ",{"type":21,"tag":101,"props":3253,"children":3255},{"className":3254},[],[3256],{"type":26,"value":106},{"type":26,"value":3258},"-with-empty-body delivery (and, in JS, a ",{"type":21,"tag":101,"props":3260,"children":3262},{"className":3261},[],[3263],{"type":26,"value":114},{"type":26,"value":3265}," payload) as a ",{"type":21,"tag":101,"props":3267,"children":3269},{"className":3268},[],[3270],{"type":26,"value":3271},"502",{"type":26,"value":3273}," failure:",{"type":21,"tag":735,"props":3275,"children":3276},{},[3277,3743],{"type":21,"tag":739,"props":3278,"children":3279},{"v-slot:javascript":7},[3280],{"type":21,"tag":311,"props":3281,"children":3283},{"className":744,"code":3282,"language":746,"meta":7,"style":7},"var ok2xx = r.responseStatus >= 200 && r.responseStatus \u003C 300;\nvar emptyBody = !r.responseBody || r.responseBody.trim() === \"\";\n\n// Also catch endpoints that always answer 200 but embed {\"ok\": false}.\nvar appError = false;\nif (ok2xx && !emptyBody) {\n  try {\n    var parsed = JSON.parse(r.responseBody);\n    appError = parsed && parsed.ok === false;\n  } catch (e) {\n    // not JSON — leave appError false\n  }\n}\n\nif (ok2xx && (emptyBody || appError)) {\n  // Override the recorded response: mark it failed. Only the fields we set\n  // change; the rest of the response is preserved.\n  r.setResponseStatus(502);\n  r.setResponseHeader(\"X-Webhookrelay-Flagged\", \"response-function\");\n  if (emptyBody) {\n    r.setResponseBody(\"empty body from destination (flagged by response function)\");\n  }\n}\n",[3284],{"type":21,"tag":101,"props":3285,"children":3286},{"__ignoreMap":7},[3287,3335,3388,3395,3403,3428,3454,3467,3503,3540,3558,3566,3573,3580,3587,3616,3624,3632,3657,3691,3703,3729,3736],{"type":21,"tag":321,"props":3288,"children":3289},{"class":323,"line":324},[3290,3294,3299,3303,3307,3311,3315,3319,3323,3327,3331],{"type":21,"tag":321,"props":3291,"children":3292},{"style":765},[3293],{"type":26,"value":768},{"type":21,"tag":321,"props":3295,"children":3296},{"style":771},[3297],{"type":26,"value":3298}," ok2xx ",{"type":21,"tag":321,"props":3300,"children":3301},{"style":765},[3302],{"type":26,"value":779},{"type":21,"tag":321,"props":3304,"children":3305},{"style":771},[3306],{"type":26,"value":784},{"type":21,"tag":321,"props":3308,"children":3309},{"style":765},[3310],{"type":26,"value":809},{"type":21,"tag":321,"props":3312,"children":3313},{"style":792},[3314],{"type":26,"value":1947},{"type":21,"tag":321,"props":3316,"children":3317},{"style":765},[3318],{"type":26,"value":1952},{"type":21,"tag":321,"props":3320,"children":3321},{"style":771},[3322],{"type":26,"value":784},{"type":21,"tag":321,"props":3324,"children":3325},{"style":765},[3326],{"type":26,"value":1961},{"type":21,"tag":321,"props":3328,"children":3329},{"style":792},[3330],{"type":26,"value":1966},{"type":21,"tag":321,"props":3332,"children":3333},{"style":771},[3334],{"type":26,"value":819},{"type":21,"tag":321,"props":3336,"children":3337},{"class":323,"line":333},[3338,3342,3347,3351,3356,3360,3364,3368,3372,3376,3380,3384],{"type":21,"tag":321,"props":3339,"children":3340},{"style":765},[3341],{"type":26,"value":768},{"type":21,"tag":321,"props":3343,"children":3344},{"style":771},[3345],{"type":26,"value":3346}," emptyBody ",{"type":21,"tag":321,"props":3348,"children":3349},{"style":765},[3350],{"type":26,"value":779},{"type":21,"tag":321,"props":3352,"children":3353},{"style":765},[3354],{"type":26,"value":3355}," !",{"type":21,"tag":321,"props":3357,"children":3358},{"style":771},[3359],{"type":26,"value":1989},{"type":21,"tag":321,"props":3361,"children":3362},{"style":765},[3363],{"type":26,"value":1994},{"type":21,"tag":321,"props":3365,"children":3366},{"style":771},[3367],{"type":26,"value":1999},{"type":21,"tag":321,"props":3369,"children":3370},{"style":951},[3371],{"type":26,"value":2004},{"type":21,"tag":321,"props":3373,"children":3374},{"style":771},[3375],{"type":26,"value":2009},{"type":21,"tag":321,"props":3377,"children":3378},{"style":765},[3379],{"type":26,"value":789},{"type":21,"tag":321,"props":3381,"children":3382},{"style":887},[3383],{"type":26,"value":2018},{"type":21,"tag":321,"props":3385,"children":3386},{"style":771},[3387],{"type":26,"value":819},{"type":21,"tag":321,"props":3389,"children":3390},{"class":323,"line":342},[3391],{"type":21,"tag":321,"props":3392,"children":3393},{"emptyLinePlaceholder":825},[3394],{"type":26,"value":828},{"type":21,"tag":321,"props":3396,"children":3397},{"class":323,"line":351},[3398],{"type":21,"tag":321,"props":3399,"children":3400},{"style":756},[3401],{"type":26,"value":3402},"// Also catch endpoints that always answer 200 but embed {\"ok\": false}.\n",{"type":21,"tag":321,"props":3404,"children":3405},{"class":323,"line":360},[3406,3410,3415,3419,3424],{"type":21,"tag":321,"props":3407,"children":3408},{"style":765},[3409],{"type":26,"value":768},{"type":21,"tag":321,"props":3411,"children":3412},{"style":771},[3413],{"type":26,"value":3414}," appError ",{"type":21,"tag":321,"props":3416,"children":3417},{"style":765},[3418],{"type":26,"value":779},{"type":21,"tag":321,"props":3420,"children":3421},{"style":792},[3422],{"type":26,"value":3423}," false",{"type":21,"tag":321,"props":3425,"children":3426},{"style":771},[3427],{"type":26,"value":819},{"type":21,"tag":321,"props":3429,"children":3430},{"class":323,"line":369},[3431,3435,3440,3445,3449],{"type":21,"tag":321,"props":3432,"children":3433},{"style":765},[3434],{"type":26,"value":836},{"type":21,"tag":321,"props":3436,"children":3437},{"style":771},[3438],{"type":26,"value":3439}," (ok2xx ",{"type":21,"tag":321,"props":3441,"children":3442},{"style":765},[3443],{"type":26,"value":3444},"&&",{"type":21,"tag":321,"props":3446,"children":3447},{"style":765},[3448],{"type":26,"value":3355},{"type":21,"tag":321,"props":3450,"children":3451},{"style":771},[3452],{"type":26,"value":3453},"emptyBody) {\n",{"type":21,"tag":321,"props":3455,"children":3456},{"class":323,"line":378},[3457,3462],{"type":21,"tag":321,"props":3458,"children":3459},{"style":765},[3460],{"type":26,"value":3461},"  try",{"type":21,"tag":321,"props":3463,"children":3464},{"style":771},[3465],{"type":26,"value":3466}," {\n",{"type":21,"tag":321,"props":3468,"children":3469},{"class":323,"line":934},[3470,3475,3480,3484,3489,3493,3498],{"type":21,"tag":321,"props":3471,"children":3472},{"style":765},[3473],{"type":26,"value":3474},"    var",{"type":21,"tag":321,"props":3476,"children":3477},{"style":771},[3478],{"type":26,"value":3479}," parsed ",{"type":21,"tag":321,"props":3481,"children":3482},{"style":765},[3483],{"type":26,"value":779},{"type":21,"tag":321,"props":3485,"children":3486},{"style":792},[3487],{"type":26,"value":3488}," JSON",{"type":21,"tag":321,"props":3490,"children":3491},{"style":771},[3492],{"type":26,"value":69},{"type":21,"tag":321,"props":3494,"children":3495},{"style":951},[3496],{"type":26,"value":3497},"parse",{"type":21,"tag":321,"props":3499,"children":3500},{"style":771},[3501],{"type":26,"value":3502},"(r.responseBody);\n",{"type":21,"tag":321,"props":3504,"children":3505},{"class":323,"line":942},[3506,3511,3515,3519,3523,3528,3532,3536],{"type":21,"tag":321,"props":3507,"children":3508},{"style":771},[3509],{"type":26,"value":3510},"    appError ",{"type":21,"tag":321,"props":3512,"children":3513},{"style":765},[3514],{"type":26,"value":779},{"type":21,"tag":321,"props":3516,"children":3517},{"style":771},[3518],{"type":26,"value":3479},{"type":21,"tag":321,"props":3520,"children":3521},{"style":765},[3522],{"type":26,"value":3444},{"type":21,"tag":321,"props":3524,"children":3525},{"style":771},[3526],{"type":26,"value":3527}," parsed.ok ",{"type":21,"tag":321,"props":3529,"children":3530},{"style":765},[3531],{"type":26,"value":789},{"type":21,"tag":321,"props":3533,"children":3534},{"style":792},[3535],{"type":26,"value":3423},{"type":21,"tag":321,"props":3537,"children":3538},{"style":771},[3539],{"type":26,"value":819},{"type":21,"tag":321,"props":3541,"children":3542},{"class":323,"line":1005},[3543,3548,3553],{"type":21,"tag":321,"props":3544,"children":3545},{"style":771},[3546],{"type":26,"value":3547},"  } ",{"type":21,"tag":321,"props":3549,"children":3550},{"style":765},[3551],{"type":26,"value":3552},"catch",{"type":21,"tag":321,"props":3554,"children":3555},{"style":771},[3556],{"type":26,"value":3557}," (e) {\n",{"type":21,"tag":321,"props":3559,"children":3560},{"class":323,"line":1013},[3561],{"type":21,"tag":321,"props":3562,"children":3563},{"style":756},[3564],{"type":26,"value":3565},"    // not JSON — leave appError false\n",{"type":21,"tag":321,"props":3567,"children":3568},{"class":323,"line":1054},[3569],{"type":21,"tag":321,"props":3570,"children":3571},{"style":771},[3572],{"type":26,"value":1189},{"type":21,"tag":321,"props":3574,"children":3575},{"class":323,"line":1068},[3576],{"type":21,"tag":321,"props":3577,"children":3578},{"style":771},[3579],{"type":26,"value":384},{"type":21,"tag":321,"props":3581,"children":3582},{"class":323,"line":1106},[3583],{"type":21,"tag":321,"props":3584,"children":3585},{"emptyLinePlaceholder":825},[3586],{"type":26,"value":828},{"type":21,"tag":321,"props":3588,"children":3589},{"class":323,"line":1154},[3590,3594,3598,3602,3607,3611],{"type":21,"tag":321,"props":3591,"children":3592},{"style":765},[3593],{"type":26,"value":836},{"type":21,"tag":321,"props":3595,"children":3596},{"style":771},[3597],{"type":26,"value":3439},{"type":21,"tag":321,"props":3599,"children":3600},{"style":765},[3601],{"type":26,"value":3444},{"type":21,"tag":321,"props":3603,"children":3604},{"style":771},[3605],{"type":26,"value":3606}," (emptyBody ",{"type":21,"tag":321,"props":3608,"children":3609},{"style":765},[3610],{"type":26,"value":1994},{"type":21,"tag":321,"props":3612,"children":3613},{"style":771},[3614],{"type":26,"value":3615}," appError)) {\n",{"type":21,"tag":321,"props":3617,"children":3618},{"class":323,"line":1183},[3619],{"type":21,"tag":321,"props":3620,"children":3621},{"style":756},[3622],{"type":26,"value":3623},"  // Override the recorded response: mark it failed. Only the fields we set\n",{"type":21,"tag":321,"props":3625,"children":3626},{"class":323,"line":1192},[3627],{"type":21,"tag":321,"props":3628,"children":3629},{"style":756},[3630],{"type":26,"value":3631},"  // change; the rest of the response is preserved.\n",{"type":21,"tag":321,"props":3633,"children":3634},{"class":323,"line":1696},[3635,3640,3645,3649,3653],{"type":21,"tag":321,"props":3636,"children":3637},{"style":771},[3638],{"type":26,"value":3639},"  r.",{"type":21,"tag":321,"props":3641,"children":3642},{"style":951},[3643],{"type":26,"value":3644},"setResponseStatus",{"type":21,"tag":321,"props":3646,"children":3647},{"style":771},[3648],{"type":26,"value":959},{"type":21,"tag":321,"props":3650,"children":3651},{"style":792},[3652],{"type":26,"value":3271},{"type":21,"tag":321,"props":3654,"children":3655},{"style":771},[3656],{"type":26,"value":1051},{"type":21,"tag":321,"props":3658,"children":3659},{"class":323,"line":1722},[3660,3664,3669,3673,3678,3682,3687],{"type":21,"tag":321,"props":3661,"children":3662},{"style":771},[3663],{"type":26,"value":3639},{"type":21,"tag":321,"props":3665,"children":3666},{"style":951},[3667],{"type":26,"value":3668},"setResponseHeader",{"type":21,"tag":321,"props":3670,"children":3671},{"style":771},[3672],{"type":26,"value":959},{"type":21,"tag":321,"props":3674,"children":3675},{"style":887},[3676],{"type":26,"value":3677},"\"X-Webhookrelay-Flagged\"",{"type":21,"tag":321,"props":3679,"children":3680},{"style":771},[3681],{"type":26,"value":446},{"type":21,"tag":321,"props":3683,"children":3684},{"style":887},[3685],{"type":26,"value":3686},"\"response-function\"",{"type":21,"tag":321,"props":3688,"children":3689},{"style":771},[3690],{"type":26,"value":1051},{"type":21,"tag":321,"props":3692,"children":3693},{"class":323,"line":1749},[3694,3698],{"type":21,"tag":321,"props":3695,"children":3696},{"style":765},[3697],{"type":26,"value":1060},{"type":21,"tag":321,"props":3699,"children":3700},{"style":771},[3701],{"type":26,"value":3702}," (emptyBody) {\n",{"type":21,"tag":321,"props":3704,"children":3705},{"class":323,"line":1789},[3706,3711,3716,3720,3725],{"type":21,"tag":321,"props":3707,"children":3708},{"style":771},[3709],{"type":26,"value":3710},"    r.",{"type":21,"tag":321,"props":3712,"children":3713},{"style":951},[3714],{"type":26,"value":3715},"setResponseBody",{"type":21,"tag":321,"props":3717,"children":3718},{"style":771},[3719],{"type":26,"value":959},{"type":21,"tag":321,"props":3721,"children":3722},{"style":887},[3723],{"type":26,"value":3724},"\"empty body from destination (flagged by response function)\"",{"type":21,"tag":321,"props":3726,"children":3727},{"style":771},[3728],{"type":26,"value":1051},{"type":21,"tag":321,"props":3730,"children":3731},{"class":323,"line":1807},[3732],{"type":21,"tag":321,"props":3733,"children":3734},{"style":771},[3735],{"type":26,"value":1189},{"type":21,"tag":321,"props":3737,"children":3738},{"class":323,"line":1816},[3739],{"type":21,"tag":321,"props":3740,"children":3741},{"style":771},[3742],{"type":26,"value":384},{"type":21,"tag":739,"props":3744,"children":3745},{"v-slot:lua":7},[3746],{"type":21,"tag":311,"props":3747,"children":3749},{"className":1203,"code":3748,"language":1205,"meta":7,"style":7},"local ok2xx = r.ResponseStatus >= 200 and r.ResponseStatus \u003C 300\nlocal empty_body = r.ResponseBody == nil or r.ResponseBody == \"\"\n\nif ok2xx and empty_body then\n  r:SetResponseStatusCode(502)\n  r:SetResponseHeader(\"X-Webhookrelay-Flagged\", \"response-function\")\n  r:SetResponseBody(\"empty body from destination (flagged by response function)\")\nend\n",[3750],{"type":21,"tag":101,"props":3751,"children":3752},{"__ignoreMap":7},[3753,3804,3857,3864,3888,3917,3953,3981],{"type":21,"tag":321,"props":3754,"children":3755},{"class":323,"line":324},[3756,3760,3764,3768,3772,3776,3780,3784,3788,3792,3796,3800],{"type":21,"tag":321,"props":3757,"children":3758},{"style":765},[3759],{"type":26,"value":1225},{"type":21,"tag":321,"props":3761,"children":3762},{"style":771},[3763],{"type":26,"value":3298},{"type":21,"tag":321,"props":3765,"children":3766},{"style":765},[3767],{"type":26,"value":779},{"type":21,"tag":321,"props":3769,"children":3770},{"style":771},[3771],{"type":26,"value":1313},{"type":21,"tag":321,"props":3773,"children":3774},{"style":951},[3775],{"type":26,"value":1318},{"type":21,"tag":321,"props":3777,"children":3778},{"style":765},[3779],{"type":26,"value":1345},{"type":21,"tag":321,"props":3781,"children":3782},{"style":792},[3783],{"type":26,"value":1947},{"type":21,"tag":321,"props":3785,"children":3786},{"style":765},[3787],{"type":26,"value":2541},{"type":21,"tag":321,"props":3789,"children":3790},{"style":771},[3791],{"type":26,"value":1313},{"type":21,"tag":321,"props":3793,"children":3794},{"style":951},[3795],{"type":26,"value":1318},{"type":21,"tag":321,"props":3797,"children":3798},{"style":765},[3799],{"type":26,"value":2554},{"type":21,"tag":321,"props":3801,"children":3802},{"style":792},[3803],{"type":26,"value":2559},{"type":21,"tag":321,"props":3805,"children":3806},{"class":323,"line":333},[3807,3811,3816,3820,3824,3828,3832,3836,3840,3844,3848,3852],{"type":21,"tag":321,"props":3808,"children":3809},{"style":765},[3810],{"type":26,"value":1225},{"type":21,"tag":321,"props":3812,"children":3813},{"style":771},[3814],{"type":26,"value":3815}," empty_body ",{"type":21,"tag":321,"props":3817,"children":3818},{"style":765},[3819],{"type":26,"value":779},{"type":21,"tag":321,"props":3821,"children":3822},{"style":771},[3823],{"type":26,"value":1313},{"type":21,"tag":321,"props":3825,"children":3826},{"style":951},[3827],{"type":26,"value":2576},{"type":21,"tag":321,"props":3829,"children":3830},{"style":765},[3831],{"type":26,"value":1323},{"type":21,"tag":321,"props":3833,"children":3834},{"style":792},[3835],{"type":26,"value":2585},{"type":21,"tag":321,"props":3837,"children":3838},{"style":765},[3839],{"type":26,"value":1332},{"type":21,"tag":321,"props":3841,"children":3842},{"style":771},[3843],{"type":26,"value":1313},{"type":21,"tag":321,"props":3845,"children":3846},{"style":951},[3847],{"type":26,"value":2576},{"type":21,"tag":321,"props":3849,"children":3850},{"style":765},[3851],{"type":26,"value":1323},{"type":21,"tag":321,"props":3853,"children":3854},{"style":887},[3855],{"type":26,"value":3856}," \"\"\n",{"type":21,"tag":321,"props":3858,"children":3859},{"class":323,"line":342},[3860],{"type":21,"tag":321,"props":3861,"children":3862},{"emptyLinePlaceholder":825},[3863],{"type":26,"value":828},{"type":21,"tag":321,"props":3865,"children":3866},{"class":323,"line":351},[3867,3871,3875,3880,3884],{"type":21,"tag":321,"props":3868,"children":3869},{"style":765},[3870],{"type":26,"value":836},{"type":21,"tag":321,"props":3872,"children":3873},{"style":771},[3874],{"type":26,"value":3298},{"type":21,"tag":321,"props":3876,"children":3877},{"style":765},[3878],{"type":26,"value":3879},"and",{"type":21,"tag":321,"props":3881,"children":3882},{"style":771},[3883],{"type":26,"value":3815},{"type":21,"tag":321,"props":3885,"children":3886},{"style":765},[3887],{"type":26,"value":1366},{"type":21,"tag":321,"props":3889,"children":3890},{"class":323,"line":360},[3891,3896,3900,3905,3909,3913],{"type":21,"tag":321,"props":3892,"children":3893},{"style":951},[3894],{"type":26,"value":3895},"  r",{"type":21,"tag":321,"props":3897,"children":3898},{"style":771},[3899],{"type":26,"value":1676},{"type":21,"tag":321,"props":3901,"children":3902},{"style":792},[3903],{"type":26,"value":3904},"SetResponseStatusCode",{"type":21,"tag":321,"props":3906,"children":3907},{"style":771},[3908],{"type":26,"value":959},{"type":21,"tag":321,"props":3910,"children":3911},{"style":792},[3912],{"type":26,"value":3271},{"type":21,"tag":321,"props":3914,"children":3915},{"style":771},[3916],{"type":26,"value":1253},{"type":21,"tag":321,"props":3918,"children":3919},{"class":323,"line":369},[3920,3924,3928,3933,3937,3941,3945,3949],{"type":21,"tag":321,"props":3921,"children":3922},{"style":951},[3923],{"type":26,"value":3895},{"type":21,"tag":321,"props":3925,"children":3926},{"style":771},[3927],{"type":26,"value":1676},{"type":21,"tag":321,"props":3929,"children":3930},{"style":792},[3931],{"type":26,"value":3932},"SetResponseHeader",{"type":21,"tag":321,"props":3934,"children":3935},{"style":771},[3936],{"type":26,"value":959},{"type":21,"tag":321,"props":3938,"children":3939},{"style":887},[3940],{"type":26,"value":3677},{"type":21,"tag":321,"props":3942,"children":3943},{"style":771},[3944],{"type":26,"value":446},{"type":21,"tag":321,"props":3946,"children":3947},{"style":887},[3948],{"type":26,"value":3686},{"type":21,"tag":321,"props":3950,"children":3951},{"style":771},[3952],{"type":26,"value":1253},{"type":21,"tag":321,"props":3954,"children":3955},{"class":323,"line":378},[3956,3960,3964,3969,3973,3977],{"type":21,"tag":321,"props":3957,"children":3958},{"style":951},[3959],{"type":26,"value":3895},{"type":21,"tag":321,"props":3961,"children":3962},{"style":771},[3963],{"type":26,"value":1676},{"type":21,"tag":321,"props":3965,"children":3966},{"style":792},[3967],{"type":26,"value":3968},"SetResponseBody",{"type":21,"tag":321,"props":3970,"children":3971},{"style":771},[3972],{"type":26,"value":959},{"type":21,"tag":321,"props":3974,"children":3975},{"style":887},[3976],{"type":26,"value":3724},{"type":21,"tag":321,"props":3978,"children":3979},{"style":771},[3980],{"type":26,"value":1253},{"type":21,"tag":321,"props":3982,"children":3983},{"class":323,"line":934},[3984],{"type":21,"tag":321,"props":3985,"children":3986},{"style":765},[3987],{"type":26,"value":1644},{"type":21,"tag":177,"props":3989,"children":3991},{"id":3990},"when-it-runs-exactly-once",[3992],{"type":26,"value":3993},"When it runs (exactly once)",{"type":21,"tag":22,"props":3995,"children":3996},{},[3997,3999,4004],{"type":26,"value":3998},"A response function runs ",{"type":21,"tag":29,"props":4000,"children":4001},{},[4002],{"type":26,"value":4003},"once",{"type":26,"value":4005}," per delivery, on the terminal outcome, regardless of which delivery path the webhook takes:",{"type":21,"tag":210,"props":4007,"children":4008},{},[4009,4024],{"type":21,"tag":214,"props":4010,"children":4011},{},[4012],{"type":21,"tag":218,"props":4013,"children":4014},{},[4015,4020],{"type":21,"tag":222,"props":4016,"children":4017},{},[4018],{"type":26,"value":4019},"Output / path",{"type":21,"tag":222,"props":4021,"children":4022},{},[4023],{"type":26,"value":236},{"type":21,"tag":238,"props":4025,"children":4026},{},[4027,4040,4053,4066,4079],{"type":21,"tag":218,"props":4028,"children":4029},{},[4030,4035],{"type":21,"tag":245,"props":4031,"children":4032},{},[4033],{"type":26,"value":4034},"Public HTTP, no durability",{"type":21,"tag":245,"props":4036,"children":4037},{},[4038],{"type":26,"value":4039},"on the terminal outcome (sent/failed)",{"type":21,"tag":218,"props":4041,"children":4042},{},[4043,4048],{"type":21,"tag":245,"props":4044,"children":4045},{},[4046],{"type":26,"value":4047},"Public HTTP, durable retry",{"type":21,"tag":245,"props":4049,"children":4050},{},[4051],{"type":26,"value":4052},"when durable retry reaches a terminal outcome — success, terminal 4xx, or give-up after the deadline",{"type":21,"tag":218,"props":4054,"children":4055},{},[4056,4061],{"type":21,"tag":245,"props":4057,"children":4058},{},[4059],{"type":26,"value":4060},"Throttled output",{"type":21,"tag":245,"props":4062,"children":4063},{},[4064],{"type":26,"value":4065},"on the terminal outcome (a failure handed to durable retry fires when retries finish)",{"type":21,"tag":218,"props":4067,"children":4068},{},[4069,4074],{"type":21,"tag":245,"props":4070,"children":4071},{},[4072],{"type":26,"value":4073},"Internal (relay agent) output",{"type":21,"tag":245,"props":4075,"children":4076},{},[4077],{"type":26,"value":4078},"when the agent reports the delivery result back",{"type":21,"tag":218,"props":4080,"children":4081},{},[4082,4087],{"type":21,"tag":245,"props":4083,"children":4084},{},[4085],{"type":26,"value":4086},"Manual retry / redeliver",{"type":21,"tag":245,"props":4088,"children":4089},{},[4090],{"type":26,"value":4091},"on the re-delivery's terminal outcome",{"type":21,"tag":22,"props":4093,"children":4094},{},[4095,4097,4103,4105,4109],{"type":26,"value":4096},"A webhook handed off to durable retry is recorded as ",{"type":21,"tag":101,"props":4098,"children":4100},{"className":4099},[],[4101],{"type":26,"value":4102},"stalled",{"type":26,"value":4104}," (not terminal) on the immediate path, so the function does ",{"type":21,"tag":29,"props":4106,"children":4107},{},[4108],{"type":26,"value":3123},{"type":26,"value":4110}," fire early — it runs once durable retry finishes.",{"type":21,"tag":138,"props":4112,"children":4113},{},[4114],{"type":21,"tag":22,"props":4115,"children":4116},{},[4117,4122],{"type":21,"tag":29,"props":4118,"children":4119},{},[4120],{"type":26,"value":4121},"Internal (relay-agent) outputs",{"type":26,"value":4123}," run the response function on the gRPC agent path, where the agent reports its delivery result back. The legacy websocket agent stream is fire-and-forget (it carries no response), so for full-fidelity response functions on internal outputs, use a gRPC-based relay agent.",{"type":21,"tag":177,"props":4125,"children":4127},{"id":4126},"observability",[4128],{"type":26,"value":4129},"Observability",{"type":21,"tag":76,"props":4131,"children":4132},{},[4133,4145,4172],{"type":21,"tag":80,"props":4134,"children":4135},{},[4136,4138,4144],{"type":26,"value":4137},"Each run increments ",{"type":21,"tag":101,"props":4139,"children":4141},{"className":4140},[],[4142],{"type":26,"value":4143},"relay_response_function_runs_total{result=\"ok|function_error|exec_error\"}",{"type":26,"value":69},{"type":21,"tag":80,"props":4146,"children":4147},{},[4148,4150,4155,4157,4163,4165,4170],{"type":26,"value":4149},"Reactor execute logs (under the function's ",{"type":21,"tag":29,"props":4151,"children":4152},{},[4153],{"type":26,"value":4154},"Logs",{"type":26,"value":4156},") capture every run, attributed to the ",{"type":21,"tag":101,"props":4158,"children":4160},{"className":4159},[],[4161],{"type":26,"value":4162},"response",{"type":26,"value":4164}," step. The webhook log stores the run's execution id, so the log-details view renders a ",{"type":21,"tag":29,"props":4166,"children":4167},{},[4168],{"type":26,"value":4169},"Response function diff",{"type":26,"value":4171}," showing what the function recorded.",{"type":21,"tag":80,"props":4173,"children":4174},{},[4175,4177,4183,4185,4191],{"type":26,"value":4176},"A function that throws emits a ",{"type":21,"tag":101,"props":4178,"children":4180},{"className":4179},[],[4181],{"type":26,"value":4182},"function error",{"type":26,"value":4184}," notification with ",{"type":21,"tag":101,"props":4186,"children":4188},{"className":4187},[],[4189],{"type":26,"value":4190},"step = \"response\"",{"type":26,"value":69},{"type":21,"tag":177,"props":4193,"children":4195},{"id":4194},"next-steps",[4196],{"type":26,"value":4197},"Next steps",{"type":21,"tag":76,"props":4199,"children":4200},{},[4201,4212,4223,4251],{"type":21,"tag":80,"props":4202,"children":4203},{},[4204,4210],{"type":21,"tag":168,"props":4205,"children":4207},{"href":4206},"/docs/webhooks/functions/modify-request",[4208],{"type":26,"value":4209},"Read, write request & response data",{"type":26,"value":4211}," — the request-side mutators and config variables.",{"type":21,"tag":80,"props":4213,"children":4214},{},[4215,4221],{"type":21,"tag":168,"props":4216,"children":4218},{"href":4217},"/docs/webhooks/functions/make-http-request",[4219],{"type":26,"value":4220},"Make HTTP requests",{"type":26,"value":4222}," — call external APIs (used here to send alerts).",{"type":21,"tag":80,"props":4224,"children":4225},{},[4226,4230,4232,4237,4238,4243,4245,4250],{"type":21,"tag":168,"props":4227,"children":4228},{"href":683},[4229],{"type":26,"value":686},{"type":26,"value":4231}," — ",{"type":21,"tag":101,"props":4233,"children":4235},{"className":4234},[],[4236],{"type":26,"value":635},{"type":26,"value":446},{"type":21,"tag":101,"props":4239,"children":4241},{"className":4240},[],[4242],{"type":26,"value":642},{"type":26,"value":4244},", and the rest of ",{"type":21,"tag":101,"props":4246,"children":4248},{"className":4247},[],[4249],{"type":26,"value":466},{"type":26,"value":69},{"type":21,"tag":80,"props":4252,"children":4253},{},[4254,4260],{"type":21,"tag":168,"props":4255,"children":4257},{"href":4256},"/docs/webhooks/functions/send-emails",[4258],{"type":26,"value":4259},"Send emails",{"type":26,"value":4261}," — alert by email instead of an HTTP call.",{"type":21,"tag":4263,"props":4264,"children":4265},"style",{},[4266],{"type":26,"value":4267},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":342,"depth":342,"links":4269},[4270,4271,4273,4274,4275,4276,4277,4278],{"id":179,"depth":333,"text":182},{"id":422,"depth":333,"text":4272},"The r object",{"id":709,"depth":333,"text":712},{"id":1833,"depth":333,"text":1836},{"id":3105,"depth":333,"text":173},{"id":3990,"depth":333,"text":3993},{"id":4126,"depth":333,"text":4129},{"id":4194,"depth":333,"text":4197},"markdown","content:docs:webhooks:functions:13.response-functions.md","content","docs/webhooks/functions/13.response-functions.md","docs/webhooks/functions/13.response-functions","md",{"loc":4},[4287],{"_path":4288,"title":4289},"/docs/webhooks/internal/localhost","Receiving webhooks on localhost",[4291,4294,4297,4300,4303,4306,4309,4312],{"_path":4292,"title":4293},"/docs/installation/cli","CLI",{"_path":4295,"title":4296},"/docs/installation/docker","Docker container",{"_path":4298,"title":4299},"/docs/installation/docker-compose","Docker Compose",{"_path":4301,"title":4302},"/docs/installation/kubernetes","Kubernetes",{"_path":4304,"title":4305},"/docs/installation/autostart-windows","Autostart (Windows)",{"_path":4307,"title":4308},"/docs/installation/autostart-linux","Autostart (Linux)",{"_path":4310,"title":4311},"/docs/installation/autostart-macos","Autostart (MacOS)",{"_path":4313,"title":4314},"/docs/installation/behind-proxy","HTTP proxy configuration",[4316,4319,4322,4325],{"_path":4317,"title":4318},"/docs/webhooks/auth/username-password","Username and password",{"_path":4320,"title":4321},"/docs/webhooks/auth/hmac","HMAC",{"_path":4323,"title":4324},"/docs/webhooks/auth/jwt","JWT authentication",{"_path":4326,"title":4327},"/docs/webhooks/auth/http-method","Auth using request method",[4329,4332],{"_path":4330,"title":4331},"/docs/webhooks/public/public-destination","Forward to public URL",{"_path":4333,"title":4334},"/docs/webhooks/public/multiple-destination-urls","Multiple destinations",[4336],{"_path":4337,"title":4338},"/docs/webhooks/cron/using-cron-webhooks","Schedule recurring webhooks",[4340,4343,4346,4349,4352,4355,4358],{"_path":4341,"title":4342},"/docs/service-connections","Service Connections",{"_path":4344,"title":4345},"/docs/service-connections/aws_s3","AWS S3",{"_path":4347,"title":4348},"/docs/service-connections/aws_sns","AWS SNS",{"_path":4350,"title":4351},"/docs/service-connections/aws_sqs","AWS SQS",{"_path":4353,"title":4354},"/docs/service-connections/azure","Azure",{"_path":4356,"title":4357},"/docs/service-connections/gcp_gcs","GCP Cloud Storage",{"_path":4359,"title":4360},"/docs/service-connections/gcp_pubsub","GCP Pub/Sub",[4362,4365,4368],{"_path":4363,"title":4364},"/docs/email","Receive emails as webhooks",{"_path":4366,"title":4367},"/docs/email/payload","Email webhook payload",{"_path":4369,"title":4370},"/docs/email/filtering-and-policy","Sender filtering & policy",[4372,4375],{"_path":4373,"title":4374},"/docs/tunnels/demoing-your-website","Demoing your website",{"_path":4376,"title":4377},"/docs/tunnels/regions","Regions",[4379,4382,4385,4388],{"_path":4380,"title":4381},"/docs/account/account-management","Account management",{"_path":4383,"title":4384},"/docs/account/mfa","Multi-factor authentication (MFA)",{"_path":4386,"title":4387},"/docs/account/team","Teams and sub-accounts",{"_path":4389,"title":4390},"/docs/account/billing-and-subscriptions","Billing & subscriptions",[4392,4395,4398,4401,4404,4407],{"_path":4393,"title":4394},"/docs/tutorials/cicd/jenkins-bitbucket","Jenkins and Bitbucket",{"_path":4396,"title":4397},"/docs/tutorials/cicd/jenkins-github","Jenkins and GitHub",{"_path":4399,"title":4400},"/docs/tutorials/cicd/jenkins-plugin","Jenkins Plugin",{"_path":4402,"title":4403},"/docs/tutorials/cicd/kubernetes-operator","Kubernetes Operator",{"_path":4405,"title":4406},"/docs/tutorials/cicd/terraform-atlantis","Terraform Atlantis",{"_path":4408,"title":4409},"/docs/tutorials/cicd/webhook-exec","Execute scripts on webhook",[4411,4414,4417,4420,4423,4426,4429,4432],{"_path":4412,"title":4413},"/docs/tutorials/email/airtable","Email to Airtable",{"_path":4415,"title":4416},"/docs/tutorials/email/api","Email to API",{"_path":4418,"title":4419},"/docs/tutorials/email/database","Email to Database",{"_path":4421,"title":4422},"/docs/tutorials/email/discord","Email to Discord",{"_path":4424,"title":4425},"/docs/tutorials/email/google-sheets","Email to Google Sheets",{"_path":4427,"title":4428},"/docs/tutorials/email/microsoft-teams","Email to Microsoft Teams",{"_path":4430,"title":4431},"/docs/tutorials/email/notion","Email to Notion",{"_path":4433,"title":4434},"/docs/tutorials/email/slack","Email to Slack",[4436,4439,4442],{"_path":4437,"title":4438},"/docs/tutorials/edge/home-assistant","Home Assistant",{"_path":4440,"title":4441},"/docs/tutorials/edge/javascript-app","JavaScript app",{"_path":4443,"title":4444},"/docs/tutorials/edge/node-red","Node-RED",[4446],{"_path":4447,"title":4448},"/docs/tutorials/warehouse/bigquery","GCP BigQuery",[4450,4453],{"_path":4451,"title":4452},"/docs/tutorials/transform/docker-to-slack","DockerHub webhook to Slack notification",{"_path":4454,"title":4455},"/docs/tutorials/transform/enrich-webhooks","Enrich webhooks from APIs",[4457,4460,4462,4464,4467,4470,4473,4475,4478,4481,4483,4484,4485],{"_path":4458,"title":4459},"/docs/webhooks/functions/manipulating-json","JSON encoding",{"_path":4217,"title":4461},"Make HTTP request",{"_path":4206,"title":4463},"Read, write request data",{"_path":4465,"title":4466},"/docs/webhooks/functions/multipart-form-data","Multipart form to JSON",{"_path":4468,"title":4469},"/docs/webhooks/functions/url-encoded-data","URL Encoded Form",{"_path":4471,"title":4472},"/docs/webhooks/functions/working-with-time","Working with time",{"_path":4256,"title":4474},"Sending emails",{"_path":4476,"title":4477},"/docs/webhooks/functions/crypto-functions","Base64, encryption",{"_path":4479,"title":4480},"/docs/webhooks/functions/integrate-into-cicd","Integrating into CI/CD",{"_path":4482,"title":4448},"/docs/webhooks/functions/big-query",{"_path":683,"title":686},{"_path":4,"title":8},{"_path":4486,"title":15},"/docs/webhooks/functions",1782815901991]