NAME
Apertur::SDK::Error - Base exception class for Apertur API errors
SYNOPSIS
use Apertur::SDK::Error;
eval {
Apertur::SDK::Error->throw(
status_code => 500,
code => 'INTERNAL',
message => 'Something went wrong',
);
};
if (my $err = $@) {
if (ref $err && $err->isa('Apertur::SDK::Error')) {
warn "API error: " . $err->message;
}
}
DESCRIPTION
Base error class for all Apertur SDK errors. All API errors are represented as blessed objects that can be thrown with die and caught with eval.