Skip to content

Suggestion in the event Cloudflare API is partially down #148

@nodevx2

Description

@nodevx2

Just a suggestion in the event that the Cloudflare API is down because this happened to me multiple times in the past.
There should be a protection in the script to prevent deletion of Lists and Rule on Cloudflare if the API is partially down such as if the API is up for deleting lists and rule but unable to write/upload the new list due to a problem on Cloudflare side.
My suggestion to prevent such issue is to make a test by creating a small list(jus a few domains) and a rule using different names to Cloudflare API prior to running a deletion of all CGPS lists. If such test succeed, delete the test list and rule and proceed in deleting the target CGPS lists and rule. If the test fail to create the list and rule, that indicate a possible problem on Cloudflare side so do not proceed in deleting the list because it will leave the DNS without a blocklist.

PS: I'm not an expert in coding so I'm not sure if my suggestion is the best way to prevent such issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions