For REST, it is a good idea to account for failures in the responses.
For example, in the SearchSamples Perl code, line 191 checks for this condition:
die $response->message . "\n" . $response->content unless $response->is_success;
This line stops the execution of the program if the response does not return with is_success. If there is a failure, the message title and the error message display for the user.
Related topics
Debugging and Fault Checking with SOAP in Perl
© 2009-2012 SirsiDynix