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
+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?;