Skip Menu |

This queue is for tickets about the Net-Dynect-REST CPAN distribution.

Report information
The Basics
Id: 84145
Status: new
Priority: 0/
Queue: Net-Dynect-REST

People
Owner: Nobody in particular
Requestors: bitcard [...] phroggy.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.09
Fixed in: (no value)



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.