Handle 170008 InsufficientResources from CC when fetching application instance information
This issue is similar to - https://github.com/cloudfoundry/cf-java-client/issues/798
A foundation had resource issues several months ago and has numerous apps with package state InsufficientResources. The resource issue has been resolved but automation which leverage cf-java-client is continuing to report error:
PivotalClientApiException: Exception occurred while getting application: <APP-NAME>, Error: CF-InsufficientResources(170008): Insufficient resources
The current implementation of getApplicationInstances handles errors like CF_BUILDPACK_COMPILED_FAILED and CF_INSTANCES_ERROR that can be returned from CC if the staging previously failed. However, the InsufficientResources (error code 170008) is not handled and will throw an exception when fetching application instances.