Skip to content

Exception thrown when API responds with unknown DropletState AWAITING_UPLOAD #1269

@ext-jaret

Description

@ext-jaret

In order to find the buildpack + version we are using the Droplets resource with the Reactor Java Client:

var listDropletResponse = client.droplets().list(ListDropletsRequest.builder()
                .applicationId("some-id")
                .build()).block();

But it fails to parse the response:

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.cloudfoundry.reactor.util.JsonParsingException: Cannot construct instance of `org.cloudfoundry.client.v3.droplets.DropletState`, problem: Unknown droplet state: AWAITING_UPLOAD
   at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 498] (through reference chain: org.cloudfoundry.client.v3.droplets.ListDropletsResponse$Json["resources"]->java.util.ArrayList[0]->org.cloudfoundry.client.v3.droplets.DropletResource$Json["state"])] with root cause
  java.lang.IllegalArgumentException: Unknown droplet state: AWAITING_UPLOAD

I would expect that this DropletState can be parsed instead of throwing IllegalArgumentException.

Environment:

  • Spring Boot v3.4.5
  • CF API v3.189.0
  • cloudfoundry-client-reactor v5.12.2.RELEASE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions