The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DigitalOcean::Error - Represents an HTTP error returned by the DigitalOcean API

VERSION

version 0.17

SYNOPSIS

  my $do_error = DigitalOcean::Error->new(id => "forbidden", message => "You do not have access for the attempted action.", status_code => 403, status_message => "403 Forbidden", DigitalOcean => $do);

DESCRIPTION

Represents an HTTP error returned by the DigitalOcean API.

METHODS

id The id of the error returned by the Digital Ocean API. This method is just a getter.

message The message of the error returned by the Digital Ocean API. This method is just a getter.

status_code A 3 digit number that encode the overall outcome of an HTTP response. This is the code returned by the HTTP::Response object. This method is just a getter.

status_message This returns a message that is a short human readable single line string that explains the response code. This is the message returned by the HTTP::Response object. This method is just a getter.

status_line Returns the string "<code> <message>". This is the status_line returned by the HTTP::Response object. This method is just a getter.

status_line Returns the associated DigitalOcean object that created the DigitalOcean::Error object. This method is just a getter.

AUTHOR

Adam Hopkins <srchulo@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2019 by Adam Hopkins.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.