It appears that any non-200 response will throw a MissingPropertyExceptioninstead of a ResourceDownloadExceptiondue to an invalid property reference. The issue can be found on line 121 of ExternalResolver.groovy:
if(response.statusLine.statusCode != 200) {
def rde = new ResourceDownloadException("could not get resource $url by HTTP")
rde.status = status /* MissingPropertyException exception thrown here */
rde.url = url
method.releaseConnection()
throw rde
}
There is no property status, which causes it to throw the new exception and never set the status code correctly. This effectively means there's no way to catch non-200 responses.
This can be fixed very easily by changing the line to:
It appears that any non-200 response will throw a
MissingPropertyException
instead of aResourceDownloadException
due to an invalid property reference. The issue can be found on line 121 of ExternalResolver.groovy:There is no property
status
, which causes it to throw the new exception and never set the status code correctly. This effectively means there's no way to catch non-200 responses.This can be fixed very easily by changing the line to:
rde.status = response.statusLine.statusCode