Cloudflare::API::Error

NAME

Cloudflare::API::Error - exception for a failed Cloudflare JSON response

SYNOPSIS

my $result=eval { $api->zones()->get($zone_id) };
if (my $error=$@) {
    if (ref($error) && $error->isa('Cloudflare::API::Error')) {
        warn $error->as_string();
        my $details=$error->errors();
    }
}

DESCRIPTION

Cloudflare::API throws this exception when the HTTP request succeeds but the decoded JSON envelope contains success: false. HTTP and transport failures instead throw HTTP::API::Core::Error. The error object retains the original response and Cloudflare's error and message arrays.

METHODS

SEE ALSO

Cloudflare::API, HTTP::API::Core::Error

AUTHOR

Andrew Speer andrew.speer@isolutions.com.au

LICENSE and COPYRIGHT

Copyright (c) 2026 Andrew Speer. This software is free software under the same terms as Perl 5.