inngest/function.cancelled
The inngest/function.cancelled
event is sent whenever any single function is cancelled in your Inngest environment. The event will be sent if the event is cancelled via cancelOn
event, REST API or bulk cancellation.
This event can be used to handle cleanup or similar for a single function or handle some sort of tracking function cancellations in some external system like Datadog.
You can write a function that uses the "inngest/function.cancelled"
event with the optional if
parameter to filter to specifically handle a single function by function_id
.
The event payload
- Name
name
- Type
- string: "inngest/function.cancelled"
- Description
The
inngest/
event prefix is reserved for system events in each environment.
- Name
data
- Type
- object
- Description
The event payload data.
Properties- Name
error
- Type
- object
- Description
Data about the error payload as returned from the cancelled function.
Properties- Name
message
- Type
- string
- Description
The cancellation error, always
"function cancelled"
- Name
name
- Type
- string
- Description
The name of the error, defaulting to
"Error"
.
- Name
event
- Type
- string
- Description
The cancelled function's original event payload.
- Name
function_id
- Type
- string
- Description
The cancelled function's
id
.
- Name
run_id
- Type
- string
- Description
The cancelled function's run ID.
- Name
ts
- Type
- number
- Description
The timestamp integer in milliseconds at which the cancellation occurred.
Example payload
{
"name": "inngest/function.cancelled",
"data": {
"error": {
"error": "function cancelled",
"message": "function cancelled",
"name": "Error"
},
"event": {
"data": {
"content": "Yost LLC explicabo eos",
"transcript": "s3://product-ideas/carber-vac-release.txt",
"userId": "bdce1b1b-6e3a-43e6-84c2-2deb559cdde6"
},
"id": "01JDJK451Y9KFGE5TTM2FHDEDN",
"name": "integrations/export.requested",
"ts": 1732558407003,
"user": {}
},
"events": [
{
"data": {
"content": "Yost LLC explicabo eos",
"transcript": "s3://product-ideas/carber-vac-release.txt",
"userId": "bdce1b1b-6e3a-43e6-84c2-2deb559cdde6"
},
"id": "01JDJK451Y9KFGE5TTM2FHDEDN",
"name": "integrations/export.requested",
"ts": 1732558407003
}
],
"function_id": "demo-app-export",
"run_id": "01JDJKGTGDVV4DTXHY6XYB7BKK"
},
"id": "01JDJKH1S5P2YER8PKXPZJ1YZJ",
"ts": 1732570023717
}