Skip to content

Commit cf97ed4

Browse files
committed
fix(plugin-webhooks): park a retired-method subscription under the standard-catalog VALIDATION_ERROR pair
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
1 parent 69f9d19 commit cf97ed4

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

‎packages/plugins/plugin-webhooks/src/auto-enqueuer.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,13 @@ const CUSTOM_HEADERS_CREDENTIAL: DropReason = {
133133
const RETIRED_WEBHOOK_METHODS: ReadonlySet<string> = new Set(['GET']);
134134

135135
/**
136-
* The ADR-0112 pair a retired-method park carries: the save door's own verdict
137-
* on the same row content (the `method` select refuses `get` with
138-
* `VALIDATION_FAILED`/400), judged later — the pairing
139-
* `webhook-legacy-cleartext.ts` makes for its delivery door.
136+
* The ADR-0112 pair a retired-method park carries: the standard-catalog
137+
* member for "this row content is not acceptable", judged at delivery — the
138+
* pair `webhook-legacy-cleartext.ts` carries on its own delivery door. (The
139+
* save door refusing the same value is the engine's record validator, which
140+
* answers with its own code.) A standard-catalog code needs no ledger row.
140141
*/
141-
const RETIRED_METHOD_PARK_CODE = 'VALIDATION_FAILED';
142+
const RETIRED_METHOD_PARK_CODE = 'VALIDATION_ERROR';
142143
const RETIRED_METHOD_PARK_STATUS = 400;
143144

144145
/**

‎packages/plugins/plugin-webhooks/src/webhook-get-retired-34098.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ describe('webhook method GET retired — a stored GET row is parked, never conve
212212
expect(row.signature ?? undefined).toBeUndefined();
213213
expect(row.method).toBe('GET');
214214
// The reason names the method and the fix.
215-
expect(row.error).toContain('[VALIDATION_FAILED/400]');
215+
expect(row.error).toContain('[VALIDATION_ERROR/400]');
216216
expect(row.error).toContain("webhook 'legacy_get_hook' is stored with HTTP method GET");
217217
expect(row.error).toContain('set its method to POST, PUT, PATCH or DELETE');
218218
expect(JSON.parse(row.payload_json)).toMatchObject({ object: 'probe_task', action: 'created' });
@@ -229,7 +229,7 @@ describe('webhook method GET retired — a stored GET row is parked, never conve
229229
expect((await deliveries()).map((r) => r.status)).toEqual(['dead', 'dead']);
230230
const parkedReports = errors.filter((e) => e.message.includes("webhook 'legacy_get_hook' is PARKED"));
231231
expect(parkedReports).toHaveLength(1);
232-
expect(parkedReports[0].meta).toMatchObject({ code: 'VALIDATION_FAILED', status: 400, method: 'GET' });
232+
expect(parkedReports[0].meta).toMatchObject({ code: 'VALIDATION_ERROR', status: 400, method: 'GET' });
233233

234234
// No conversion: the method reads exactly as stored.
235235
const raw: any = await driver.findOne('sys_webhook', { where: { id } } as any);

0 commit comments

Comments
 (0)