WebService::PayPal::PaymentsAdvanced::Error::HTTP - An HTTP transport error
version 0.000028
use Try::Tiny; use WebService::PayPal::PaymentsAdvanced; my $payments = WebService::PayPal::PaymentsAdvanced->new( validate_hosted_form_uri => 1, ... ); my $response; my $uri; try { $response = $payments->create_secure_token(...); } catch { die $_ unless blessed $_; if ( $_->isa('WebService::PayPal::PaymentsAdvanced::Error::HTTP') ) { log_http_error( message => $_->message, response_code => $_->http_status, http_content => $_->http_response->content, ); } # handle other exceptions };
This class represents an HTTP transport error.
It extends Throwable::Error and adds one attribute of its own.
The $error->message(), and $error->stack_trace() methods are inherited from Throwable::Error.
$error->message()
$error->stack_trace()
Throw a new instance of this class with a message created from the required http_response parameter. If the optional message_prefix is passed, the prefix will appear at the beginning of the message.
http_response
message_prefix
Returns the HTTP::Response object which was returned when attempting the HTTP request.
Returns the HTTP status code for the response.
The URI of the request that caused the HTTP error.
Bugs may be submitted through https://github.com/maxmind/webservice-paypal-paymentsadvanced/issues.
Olaf Alders <olaf@wundercounter.com>
This software is copyright (c) 2022 by MaxMind, Inc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WebService::PayPal::PaymentsAdvanced, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::PayPal::PaymentsAdvanced
CPAN shell
perl -MCPAN -e shell install WebService::PayPal::PaymentsAdvanced
For more information on module installation, please visit the detailed CPAN module installation guide.