Subject: | Net::Dynect::REST::Job has no status method |
When a task is deferred by Dyn due to excessive run time, we get a Net::Dynect::REST::Job object returned instead of a Net::Dynect::REST::Response object, and since the Job class has no status method, calls to $response->status will crash.
For example, the logout() method of Net::Dynect::REST sets "my $dynect_rest_response = $self->execute($dynect_rest_request);" and then checks $dynect_rest_response->status to see if it was successful, but if the logout was deferred because it was taking too long to execute, it crashes here (unless I wrap everything in evals, but that's clumsy).
Testing if(ref($response) eq 'Net::Dynect::REST::Job') is a possible workaround, but I think it makes sense to add a status method to the Job class, especially since the documentation for Net::Dynect::REST::Response says the status could be "incomplete", and currently there's no way to see that since a response with that status is never returned.