Subject: | Errors do not set $@ |
Date: | Wed, 30 Mar 2016 19:51:15 +0000 |
To: | bug-webservice-autotask [...] rt.cpan.org |
From: | "Nicholas Pepper" <webmaster [...] neuralproductions.com> |
Using: WebService::Autotask 1.003
Perl: 5.16.3
OS: CentOS Linux 7
There error I am running into is that most functions (such as 'create') do not actually return an error via #@ when an error happens. If you look at the 'create' function, the error handling portion of the code calls the $self->_set_error function and then returns undef. Upon further inspection of the _set_error function, the internal error variable is indeed set, but no error is thrown. I fixed this issue in my local copy by adding a:
die $self->{error};
as the last line of the _set_error function. I then correctly get an error when trying to insert an item that has errors (such as a picklist ID error).
Thank you for taking the time to write this module, it has been very useful in migrating data!
Nick Pepper