dyninc/dyn-rb — pull request #9 by murphy-slaw (2014-08-23 03:27:03+00:00)
Title: fix handing of "incomplete" requests, properly throw IncompleteRequest

The code in 1.0.4 doesn't properly handle IncompleteRequest because
1) It expects an Exception when a 307 status is returned, which isn't the case
2) It blindly attempts to format response['msgs'] as error messages in the IncompleteRequest exception, but response['msgs'] is usually nil.

This patch fixes api_request to successfully throw IncompleteRequest, which end-users can then catch and retry by getting /rest/jobs/e.job_id.