Skip to content

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

@jlanza

Description

@jlanza

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

  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions