floci-io/floci · error · AwsException

ValidationException

ValidationException

Error message

1 validation error detected: Value at 'Granularity' failed to satisfy constraint: Member must not be null.

What it means

Error "1 validation error detected: Value at 'Granularity' failed to satisfy constraint: Member must not be null." thrown in floci-io/floci.

Source

Thrown at src/main/java/io/github/hectorvent/floci/services/ce/TimeBucketing.java:28

import java.time.ZoneOffset;
import java.time.format.DateTimeParseException;
import java.util.ArrayList;
import java.util.List;

/**
 * Splits a Cost Explorer {@code TimePeriod} into AWS-shaped granularity buckets.
 * <p>
 * AWS truncates {@code Start}/{@code End} to whole-day boundaries for DAILY
 * and HOURLY, and to the first day of the month for MONTHLY. The window is
 * half-open: {@code Start} inclusive, {@code End} exclusive.
 */
final class TimeBucketing {

    enum Granularity { HOURLY, DAILY, MONTHLY }

    static Granularity parseGranularity(String value) {
        if (value == null || value.isEmpty()) {
            throw new AwsException("ValidationException",
                    "1 validation error detected: Value at 'Granularity' failed to satisfy constraint: Member must not be null.", 400);
        }
        return switch (value) {
            case "HOURLY" -> Granularity.HOURLY;
            case "DAILY" -> Granularity.DAILY;
            case "MONTHLY" -> Granularity.MONTHLY;
            default -> throw new AwsException("ValidationException",
                    "1 validation error detected: Value '" + value + "' at 'Granularity' failed to satisfy constraint: Member must satisfy enum value set: [DAILY, MONTHLY, HOURLY]", 400);
        };
    }

    static Instant parseDate(String value, String field) {
        if (value == null || value.isEmpty()) {
            throw new AwsException("ValidationException",
                    "1 validation error detected: Value at '" + field + "' failed to satisfy constraint: Member must not be null.", 400);
        }
        // AWS accepts "YYYY-MM-DD" (most common) and ISO-8601 timestamps.
        try {

View on GitHub (pinned to 62ff490619)

Solutions

  1. Set Granularity to DAILY, MONTHLY, or HOURLY in the request.

When it happens

Trigger: Thrown at src/main/java/io/github/hectorvent/floci/services/ce/TimeBucketing.java:28 when the library encounters an invalid state.

Common situations: Occurs when a Cost Explorer request omits the Granularity field. Set Granularity to DAILY, MONTHLY, or HOURLY.


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