Save code that runs on every event
Changed onSave an ES module that runs in a sandboxed Node.js on every event this app receives, with AnyHook's retries and replay around it. export default async function (event, { env, store }) {}, where event is { method, headers, body, raw_body, delivery_id, attempt } (method is always POST; the query string, path and caller IP are not kept; attempt is 0 on a test run), or a Pipedream Node.js code step (defineComponent({ run({ steps, $ }) {} })) with the changes listed at https://anyhook.net/migrate/pipedream. npm packages it imports are installed when it is saved (pin a version as pkg@1.2.3); a save that installs new packages can take a few minutes, and a failed install changes nothing (400 with npm's output). Throwing fails the delivery, which is retried on the plan's attempts. Pro and Scale; runs are capped per month with no overage, and retries, test runs, replays and schedule firings each count.
Request
- Base URL: https://anyhook.net
- URL: https://anyhook.net/api/v1/apps/{slug}/code
- Auth: HTTP bearer
Path parameters
Request body
Response
Saved
Changes
- info
added the non-success response with the status
- info