Summary
gateway transformation run reports success and returns {} for every kind of failure — a thrown exception, invalid JavaScript, or a transformation ID that does not exist. Testing a transformation before shipping it is the command's entire purpose, and it cannot tell you when the transformation is broken.
Reproduce
hookdeck gateway transformation run \
--code 'addHandler("transform",(r,c)=>{ throw new Error("boom"); });' \
--request '{"headers":{}}' --output json
→ {}
→ exit 0
Without --output json:
✔ Transformation run completed
→ exit 0
Identical {} and exit 0 for:
- a nonexistent transformation:
--id trs_bogus000
- syntactically invalid JavaScript
console.log output from the transformation is also not surfaced.
Expected
The runtime or compile error should be reported, and the exit code should be non-zero. A nonexistent --id should say so. Console output should be shown — it is the main way people debug a transform.
Scope
Pre-existing, not a regression. Verified identical on fbb924a (pre-#392) and on the merged branch.
Why it matters
This is the local-testing command. Someone iterating on a transformation gets a green tick whether their code works or throws, so the failure surfaces later in production delivery instead. It is the same shape as #367's note about outpost attempt get hiding the failure reason — "finding out why a delivery failed is the entire reason to run this command" — but on a different command, so filing separately.
Related
Filed by Claude on Phil's behalf, from release-candidate regression testing.
Summary
gateway transformation runreports success and returns{}for every kind of failure — a thrown exception, invalid JavaScript, or a transformation ID that does not exist. Testing a transformation before shipping it is the command's entire purpose, and it cannot tell you when the transformation is broken.Reproduce
Without
--output json:Identical
{}and exit 0 for:--id trs_bogus000console.logoutput from the transformation is also not surfaced.Expected
The runtime or compile error should be reported, and the exit code should be non-zero. A nonexistent
--idshould say so. Console output should be shown — it is the main way people debug a transform.Scope
Pre-existing, not a regression. Verified identical on
fbb924a(pre-#392) and on the merged branch.Why it matters
This is the local-testing command. Someone iterating on a transformation gets a green tick whether their code works or throws, so the failure surfaces later in production delivery instead. It is the same shape as #367's note about
outpost attempt gethiding the failure reason — "finding out why a delivery failed is the entire reason to run this command" — but on a different command, so filing separately.Related
Filed by Claude on Phil's behalf, from release-candidate regression testing.