fix: reject a prefixed error_handler_path on triggers (#10847)

* fix: strip the script/ prefix from trigger error handler paths

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix: strip the script/ prefix when collecting trigger handler refs

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix: relocate prefixed trigger error handlers on project retarget

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix: reject a prefixed error_handler_path on triggers instead of resolving it

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs: describe error_handler_path as a bare script path in the api schema

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
hugocasa
2026-08-28 16:43:18 +02:00
committed by GitHub
co-authored by Claude Opus 5
parent b72ccc3593
commit d334831735
14 changed files with 207 additions and 52 deletions
+72 -24
View File
@@ -30267,7 +30267,9 @@ components:
description: If true, passes the request body as a raw string instead of parsing as JSON
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -30356,7 +30358,9 @@ components:
description: If true, passes the request body as a raw string instead of parsing as JSON
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -30452,7 +30456,9 @@ components:
description: If true, passes the request body as a raw string instead of parsing as JSON
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -30644,7 +30650,9 @@ components:
description: Optional periodic heartbeat message configuration
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
description: Arguments to pass to the error handler
$ref: "#/components/schemas/ScriptArgs"
@@ -30709,7 +30717,9 @@ components:
description: Optional periodic heartbeat message configuration
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
description: Arguments to pass to the error handler
$ref: "#/components/schemas/ScriptArgs"
@@ -30785,7 +30795,9 @@ components:
description: Optional periodic heartbeat message configuration
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
description: Arguments to pass to the error handler
$ref: "#/components/schemas/ScriptArgs"
@@ -30913,7 +30925,9 @@ components:
description: Last error message if the trigger failed
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -30964,7 +30978,9 @@ components:
$ref: "#/components/schemas/TriggerMode"
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -31028,7 +31044,9 @@ components:
$ref: "#/components/schemas/TriggerMode"
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -31111,7 +31129,9 @@ components:
description: Last error message if the trigger failed
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -31152,7 +31172,9 @@ components:
$ref: "#/components/schemas/TriggerMode"
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -31206,7 +31228,9 @@ components:
$ref: "#/components/schemas/TriggerMode"
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -31604,7 +31628,9 @@ components:
description: Last error message if the trigger failed
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -31706,7 +31732,9 @@ components:
$ref: "#/components/schemas/TriggerMode"
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -31762,7 +31790,9 @@ components:
$ref: "#/components/schemas/TriggerMode"
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -31890,7 +31920,9 @@ components:
description: Timestamp of last server heartbeat (internal)
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -31930,7 +31962,9 @@ components:
description: Configuration for creating/managing the publication (tables, operations)
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -31982,7 +32016,9 @@ components:
description: Configuration for creating/managing the publication (tables, operations)
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -32059,7 +32095,9 @@ components:
description: Last error message if the trigger failed
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -32123,7 +32161,9 @@ components:
$ref: "#/components/schemas/TriggerMode"
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -32198,7 +32238,9 @@ components:
description: True if script_path points to a flow, false if it points to a script
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -32261,7 +32303,9 @@ components:
description: Last error message if the trigger failed
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -32309,7 +32353,9 @@ components:
$ref: "#/components/schemas/TriggerMode"
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
@@ -32368,7 +32414,9 @@ components:
description: True if script_path points to a flow, false if it points to a script
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare
path, without the script/ or flow/ prefix a schedule error handler takes;
it cannot be a flow.
error_handler_args:
$ref: "#/components/schemas/ScriptArgs"
description: Arguments to pass to the error handler
+13 -4
View File
@@ -268,6 +268,15 @@ pub async fn create_many_http_triggers(
format!("http_triggers:write:{}", &new_http_trigger.base.path)
})?;
// This route inserts directly, bypassing the shared create handler.
// `error_wrapper` would turn the rejection into a 500.
new_http_trigger.error_handling.validate().map_err(|err| {
Error::BadRequest(format!(
"Error occurred for HTTP route at route path: {}, error: {}",
new_http_trigger.config.route_path, err
))
})?;
handler
.validate_new(&db, &w_id, &new_http_trigger.config)
.await
@@ -570,8 +579,8 @@ impl TriggerCrud for HttpTrigger {
route_path,
&route_path_key,
Some(effective_workspaced),
trigger.config.wrap_body,
trigger.config.raw_string,
trigger.config.wrap_body.unwrap_or(false),
trigger.config.raw_string.unwrap_or(false),
trigger.config.authentication_resource_path,
trigger.base.script_path,
trigger.base.path,
@@ -626,8 +635,8 @@ impl TriggerCrud for HttpTrigger {
workspace_id = $20 AND
path = $21
"#,
trigger.config.wrap_body,
trigger.config.raw_string,
trigger.config.wrap_body.unwrap_or(false),
trigger.config.raw_string.unwrap_or(false),
trigger.config.authentication_resource_path,
trigger.base.script_path,
trigger.base.path,
+4
View File
@@ -554,6 +554,8 @@ async fn create_trigger<T: TriggerCrud>(
)));
}
new_trigger.error_handling.validate()?;
handler
.validate_new(&db, &workspace_id, &new_trigger.config)
.await?;
@@ -815,6 +817,8 @@ async fn update_trigger<T: TriggerCrud>(
)
})?;
edit_trigger.error_handling.validate()?;
handler
.validate_edit(&db, &workspace_id, &edit_trigger.config, path)
.await?;
+62
View File
@@ -84,6 +84,31 @@ pub struct TriggerErrorHandling {
pub retry: Option<sqlx::types::Json<windmill_common::flows::Retry>>,
}
impl TriggerErrorHandling {
/// Schedule and workspace error handlers encode script-vs-flow as a
/// `script/`/`flow/` prefix; a trigger's handler is always a script, so a
/// prefixed path here would be looked up verbatim as a script name and fail
/// only once the trigger errors, which is when the handler is needed.
pub fn validate(&self) -> windmill_common::error::Result<()> {
let Some(path) = self.error_handler_path.as_deref() else {
return Ok(());
};
if let Some(bare) = path.strip_prefix("script/") {
return Err(windmill_common::error::Error::BadRequest(format!(
"error_handler_path is a plain script path, not the prefixed form a schedule \
error handler takes: got '{path}', use '{bare}'"
)));
}
if path.starts_with("flow/") {
return Err(windmill_common::error::Error::BadRequest(format!(
"error_handler_path must be a script: a trigger error handler cannot be a flow \
(got '{path}')"
)));
}
Ok(())
}
}
#[derive(Serialize, Deserialize, Clone)]
pub struct Trigger<T>
where
@@ -253,6 +278,43 @@ mod tests {
use super::*;
use serde_json::json;
// --- TriggerErrorHandling::validate ---
fn error_handling(path: Option<&str>) -> TriggerErrorHandling {
TriggerErrorHandling {
error_handler_path: path.map(str::to_string),
error_handler_args: None,
retry: None,
}
}
#[test]
fn test_error_handler_path_accepts_bare_and_hub_paths() {
for path in [None, Some("f/team/handler"), Some("u/admin/handler")] {
assert!(error_handling(path).validate().is_ok(), "{path:?}");
}
assert!(error_handling(Some("hub/13953/windmill/handler"))
.validate()
.is_ok());
}
#[test]
fn test_error_handler_path_rejects_prefixed_paths() {
// The rejection names the bare path to use, so the caller can fix it
// without knowing which of the two conventions a trigger follows.
let err = error_handling(Some("script/f/team/handler"))
.validate()
.unwrap_err()
.to_string();
assert!(err.contains("f/team/handler"), "{err}");
let err = error_handling(Some("flow/f/team/handler"))
.validate()
.unwrap_err()
.to_string();
assert!(err.contains("cannot be a flow"), "{err}");
}
// --- TriggerMode serde ---
#[test]
+24 -8
View File
@@ -7935,7 +7935,9 @@ properties:
at once (1-65535)
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare path,
without the script/ or flow/ prefix a schedule error handler takes; it cannot
be a flow.
error_handler_args:
type: object
description: The arguments to pass to the script or flow
@@ -8385,7 +8387,9 @@ properties:
as JSON
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare path,
without the script/ or flow/ prefix a schedule error handler takes; it cannot
be a flow.
error_handler_args:
type: object
description: The arguments to pass to the script or flow
@@ -8552,7 +8556,9 @@ properties:
endpoint.
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare path,
without the script/ or flow/ prefix a schedule error handler takes; it cannot
be a flow.
error_handler_args:
type: object
description: The arguments to pass to the script or flow
@@ -8676,7 +8682,9 @@ properties:
- v5
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare path,
without the script/ or flow/ prefix a schedule error handler takes; it cannot
be a flow.
error_handler_args:
type: object
description: The arguments to pass to the script or flow
@@ -8772,7 +8780,9 @@ properties:
description: Array of NATS subjects to subscribe to
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare path,
without the script/ or flow/ prefix a schedule error handler takes; it cannot
be a flow.
error_handler_args:
type: object
description: The arguments to pass to the script or flow
@@ -8862,7 +8872,9 @@ properties:
description: Name of the PostgreSQL logical replication slot to use
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare path,
without the script/ or flow/ prefix a schedule error handler takes; it cannot
be a flow.
error_handler_args:
type: object
description: The arguments to pass to the script or flow
@@ -9109,7 +9121,9 @@ properties:
description: Array of SQS message attribute names to include with each message
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare path,
without the script/ or flow/ prefix a schedule error handler takes; it cannot
be a flow.
error_handler_args:
type: object
description: The arguments to pass to the script or flow
@@ -9308,7 +9322,9 @@ properties:
The extracted value replaces {{state}} in the heartbeat message.
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare path,
without the script/ or flow/ prefix a schedule error handler takes; it cannot
be a flow.
error_handler_args:
type: object
description: The arguments to pass to the script or flow
@@ -69,7 +69,7 @@ export const httpTriggerRequestSchema = z.object({
"wrap_body": z.boolean().describe("If true, wraps the request body in a 'body' parameter").optional(),
"mode": z.enum(["enabled", "disabled", "suspended"]).describe("job trigger mode").optional(),
"raw_string": z.boolean().describe("If true, passes the request body as a raw string instead of parsing as JSON").optional(),
"error_handler_path": z.string().describe("Path to a script or flow to run when the triggered job fails").optional(),
"error_handler_path": z.string().describe("Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow.").optional(),
"error_handler_args": z.record(z.string(), z.any()).describe("Arguments to pass to the error handler").optional(),
"retry": z.object({
"constant": z.object({
@@ -128,7 +128,7 @@ export const websocketTriggerRequestSchema = z.object({
"message": z.string().describe("Message to send as heartbeat. Use {{state}} as a placeholder for a value extracted from incoming messages (see state_field)."),
"state_field": z.string().describe("Optional. Top-level JSON field to extract from incoming messages. The extracted value replaces {{state}} in the heartbeat message.").optional()
}).describe("Optional periodic heartbeat message configuration").nullable().optional(),
"error_handler_path": z.string().describe("Path to a script or flow to run when the triggered job fails").optional(),
"error_handler_path": z.string().describe("Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow.").optional(),
"error_handler_args": z.record(z.string(), z.any()).describe("Arguments to pass to the error handler").optional(),
"retry": z.object({
"constant": z.object({
@@ -174,7 +174,7 @@ export const kafkaTriggerRequestSchema = z.object({
"auto_offset_reset": z.enum(["latest", "earliest"]).describe("Initial offset behavior when consumer group has no committed offset.").default("latest").optional(),
"auto_commit": z.boolean().describe("When true (default), offsets are committed automatically after receiving each message. When false, you must manually commit offsets using the commit_offsets endpoint.").default(true).optional(),
"mode": z.enum(["enabled", "disabled", "suspended"]).describe("job trigger mode").optional(),
"error_handler_path": z.string().describe("Path to a script or flow to run when the triggered job fails").optional(),
"error_handler_path": z.string().describe("Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow.").optional(),
"error_handler_args": z.record(z.string(), z.any()).describe("Arguments to pass to the error handler").optional(),
"retry": z.object({
"constant": z.object({
@@ -206,7 +206,7 @@ export const natsTriggerRequestSchema = z.object({
"consumer_name": z.string().describe("JetStream consumer name (required when use_jetstream is true)").nullable().optional(),
"subjects": z.array(z.string()).describe("Array of NATS subjects to subscribe to"),
"mode": z.enum(["enabled", "disabled", "suspended"]).describe("job trigger mode").optional(),
"error_handler_path": z.string().describe("Path to a script or flow to run when the triggered job fails").optional(),
"error_handler_path": z.string().describe("Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow.").optional(),
"error_handler_args": z.record(z.string(), z.any()).describe("Arguments to pass to the error handler").optional(),
"retry": z.object({
"constant": z.object({
@@ -247,7 +247,7 @@ export const postgresTriggerRequestSchema = z.object({
})).optional(),
"transaction_to_track": z.array(z.string())
}).describe("Configuration for creating/managing the publication (tables, operations)").optional(),
"error_handler_path": z.string().describe("Path to a script or flow to run when the triggered job fails").optional(),
"error_handler_path": z.string().describe("Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow.").optional(),
"error_handler_args": z.record(z.string(), z.any()).describe("Arguments to pass to the error handler").optional(),
"retry": z.object({
"constant": z.object({
@@ -289,7 +289,7 @@ export const mqttTriggerRequestSchema = z.object({
"script_path": z.string().describe("Path to the script or flow to execute when a message is received"),
"is_flow": z.boolean().describe("True if script_path points to a flow, false if it points to a script"),
"mode": z.enum(["enabled", "disabled", "suspended"]).describe("job trigger mode").optional(),
"error_handler_path": z.string().describe("Path to a script or flow to run when the triggered job fails").optional(),
"error_handler_path": z.string().describe("Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow.").optional(),
"error_handler_args": z.record(z.string(), z.any()).describe("Arguments to pass to the error handler").optional(),
"retry": z.object({
"constant": z.object({
@@ -326,7 +326,7 @@ export const amqpTriggerRequestSchema = z.object({
"script_path": z.string().describe("Path to the script or flow to execute when a message is received"),
"is_flow": z.boolean().describe("True if script_path points to a flow, false if it points to a script"),
"mode": z.enum(["enabled", "disabled", "suspended"]).describe("job trigger mode").optional(),
"error_handler_path": z.string().describe("Path to a script or flow to run when the triggered job fails").optional(),
"error_handler_path": z.string().describe("Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow.").optional(),
"error_handler_args": z.record(z.string(), z.any()).describe("Arguments to pass to the error handler").optional(),
"retry": z.object({
"constant": z.object({
@@ -357,7 +357,7 @@ export const sqsTriggerRequestSchema = z.object({
"script_path": z.string().describe("Path to the script or flow to execute when a message is received"),
"is_flow": z.boolean().describe("True if script_path points to a flow, false if it points to a script"),
"mode": z.enum(["enabled", "disabled", "suspended"]).describe("job trigger mode").optional(),
"error_handler_path": z.string().describe("Path to a script or flow to run when the triggered job fails").optional(),
"error_handler_path": z.string().describe("Path to a script to run when the triggered job fails. A bare path, without the script/ or flow/ prefix a schedule error handler takes; it cannot be a flow.").optional(),
"error_handler_args": z.record(z.string(), z.any()).describe("Arguments to pass to the error handler").optional(),
"retry": z.object({
"constant": z.object({
@@ -63,7 +63,9 @@ properties:
at once (1-65535)
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare path,
without the script/ or flow/ prefix a schedule error handler takes; it cannot
be a flow.
error_handler_args:
type: object
description: The arguments to pass to the script or flow
@@ -97,7 +97,9 @@ properties:
as JSON
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare path,
without the script/ or flow/ prefix a schedule error handler takes; it cannot
be a flow.
error_handler_args:
type: object
description: The arguments to pass to the script or flow
@@ -114,7 +114,9 @@ properties:
endpoint.
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare path,
without the script/ or flow/ prefix a schedule error handler takes; it cannot
be a flow.
error_handler_args:
type: object
description: The arguments to pass to the script or flow
@@ -75,7 +75,9 @@ properties:
- v5
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare path,
without the script/ or flow/ prefix a schedule error handler takes; it cannot
be a flow.
error_handler_args:
type: object
description: The arguments to pass to the script or flow
@@ -49,7 +49,9 @@ properties:
description: Array of NATS subjects to subscribe to
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare path,
without the script/ or flow/ prefix a schedule error handler takes; it cannot
be a flow.
error_handler_args:
type: object
description: The arguments to pass to the script or flow
@@ -42,7 +42,9 @@ properties:
description: Name of the PostgreSQL logical replication slot to use
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare path,
without the script/ or flow/ prefix a schedule error handler takes; it cannot
be a flow.
error_handler_args:
type: object
description: The arguments to pass to the script or flow
@@ -48,7 +48,9 @@ properties:
description: Array of SQS message attribute names to include with each message
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare path,
without the script/ or flow/ prefix a schedule error handler takes; it cannot
be a flow.
error_handler_args:
type: object
description: The arguments to pass to the script or flow
@@ -151,7 +151,9 @@ properties:
The extracted value replaces {{state}} in the heartbeat message.
error_handler_path:
type: string
description: Path to a script or flow to run when the triggered job fails
description: Path to a script to run when the triggered job fails. A bare path,
without the script/ or flow/ prefix a schedule error handler takes; it cannot
be a flow.
error_handler_args:
type: object
description: The arguments to pass to the script or flow