floci-io/floci · error · AwsException

InvalidStageDeclarationException

InvalidStageDeclarationException

Error message

Each stage must have a name and at least one action

What it means

Error "Each stage must have a name and at least one action" thrown in floci-io/floci.

Source

Thrown at src/main/java/io/github/hectorvent/floci/services/codepipeline/CodePipelineService.java:1097

        }
        String name = declaration.path("name").asText(null);
        validatePipelineName(name);
        if (!declaration.hasNonNull("roleArn")) {
            throw new AwsException("ValidationException", "pipeline.roleArn is required", 400);
        }
        if (!declaration.path("stages").isArray() || declaration.path("stages").size() < 2) {
            throw new AwsException("InvalidStructureException", "A pipeline must contain at least two stages", 400);
        }
        boolean hasArtifactStore = declaration.hasNonNull("artifactStore");
        boolean hasArtifactStores = declaration.hasNonNull("artifactStores");
        if (hasArtifactStore == hasArtifactStores) {
            throw new AwsException("ValidationException",
                    "pipeline must include exactly one of artifactStore or artifactStores", 400);
        }
        for (JsonNode stage : declaration.path("stages")) {
            if (!stage.hasNonNull("name") || !stage.path("actions").isArray()
                    || stage.path("actions").isEmpty()) {
                throw new AwsException("InvalidStageDeclarationException",
                        "Each stage must have a name and at least one action", 400);
            }
        }
        String mode = declaration.path("executionMode").asText(DEFAULT_EXECUTION_MODE);
        String type = declaration.path("pipelineType").asText(DEFAULT_PIPELINE_TYPE);
        if (!List.of("SUPERSEDED", "QUEUED", "PARALLEL").contains(mode)) {
            throw new AwsException("ValidationException", "Invalid executionMode: " + mode, 400);
        }
        if (!"SUPERSEDED".equals(mode) && !"V2".equals(type)) {
            throw new AwsException("ValidationException", mode + " requires pipelineType V2", 400);
        }
        return name;
    }

    private JsonNode normalizeDeclaration(JsonNode declaration, int version) {
        ObjectNode copy = declaration.deepCopy();
        if (!copy.hasNonNull("executionMode")) {
            copy.put("executionMode", DEFAULT_EXECUTION_MODE);

View on GitHub (pinned to 62ff490619)

Solutions

  1. Give each stage a name and at least one action in the pipeline definition.

When it happens

Trigger: Thrown at src/main/java/io/github/hectorvent/floci/services/codepipeline/CodePipelineService.java:1097 when the library encounters an invalid state.

Common situations: Occurs when a pipeline stage is missing a name or has no actions. Give every stage a name and at least one action.


AI-assisted analysis of floci-io/floci@62ff490619 (2026-08-14). Data as JSON: /api/errors/d7a44a74db5bb1dc. Report an issue: GitHub.