cloudflare-typescript icon indicating copy to clipboard operation
cloudflare-typescript copied to clipboard

Error in client.emailRouting.rules.delete(ruleIdentifier, { ...params })

Open jlanza opened this issue 2 months ago • 0 comments

Confirm this is a Typescript library issue and not an underlying Cloudflare API issue

  • [x] This is an issue with the Typescript library

Describe the bug

The function is defined as following in the documentation:

client.emailRouting.rules.[delete](https://github.com/cloudflare/cloudflare-typescript/blob/main/src/resources/email-routing/rules/rules.ts)(ruleIdentifier, { ...params }) -> EmailRoutingRule

However when you call it, on success it deletes the rule but the returned value is null and not the deleted rule. On error an exception is thown.

To Reproduce

const params = { zone_id: zoneId };
const res = await cf.emailRouting.rules.delete(ruleId, params);
console.log(res)

Output

null

Code snippets

const params = { zone_id: zoneId };
const res = await cf.emailRouting.rules.delete(ruleId, params);
console.log(res)


Output

null

OS

Ubuntu 24.04

Runtime version

Typescript v5.9.2

Library version

v5.2.0

jlanza avatar Nov 18 '25 11:11 jlanza