Hello,
I am working on a few Perl scripts using the Duo::API module from GitHub. I am mostly using json_api_call()
and everything seems to work fine, except that if there is an error, the script just prints the API response message and dies. This seems to be from the call to croak($msg)
in the parse_json_response()
function.
My question is, what is the best way to check the API response and catch an error cleanly, instead of having it just bail out? I would ideally like to log the error and keep going.
Thanks!