floci-io/floci · info · AwsException

ResourceNotFoundException

ResourceNotFoundException

Error message

No notification configuration found for backup vault: {vaultName}

What it means

GetBackupVaultNotifications in the BackupController always throws ResourceNotFoundException (HTTP 400) because the emulator never stores notification configurations for vaults. AWS Backup returns this same documented 'not configured' signal when no notifications were ever put on a vault, so SDK clients get the expected contract instead of an empty 200.

Source

Thrown at src/main/java/io/github/hectorvent/floci/services/backup/BackupController.java:99

    @Path("/backup-vaults/")
    public Response listBackupVaults(@Context HttpHeaders headers) {
        String region = regionResolver.resolveRegion(headers);
        List<BackupVault> vaults = service.listBackupVaults(region);
        ObjectNode out = objectMapper.createObjectNode();
        ArrayNode list = out.putArray("BackupVaultList");
        vaults.forEach(list::addPOJO);
        return Response.ok(out).build();
    }

    // Notification configuration is an optional, never-configured aspect of a vault in the
    // emulator. Per the AWS Backup API, GetBackupVaultNotifications returns
    // ResourceNotFoundException (HTTP 400) when no notification configuration exists for the
    // vault. We mirror that exact error contract so SDK clients see the documented
    // "not configured" signal rather than an empty 200 or a generic 400 they can't interpret.
    @GET
    @Path("/backup-vaults/{backupVaultName}/notification-configuration")
    public Response getBackupVaultNotifications(@PathParam("backupVaultName") String vaultName) {
        throw new AwsException("ResourceNotFoundException",
                "No notification configuration found for backup vault: " + vaultName, 400);
    }

    // Access policy is an optional, never-configured aspect of a vault in the emulator. Per the
    // AWS Backup API, GetBackupVaultAccessPolicy returns ResourceNotFoundException (HTTP 400)
    // when no policy exists for the vault. We mirror that exact error contract so SDK clients
    // see the documented "not configured" signal rather than an empty 200 or a generic 400.
    @GET
    @Path("/backup-vaults/{backupVaultName}/access-policy")
    public Response getBackupVaultAccessPolicy(@PathParam("backupVaultName") String vaultName) {
        throw new AwsException("ResourceNotFoundException",
                "No access policy found for backup vault: " + vaultName, 400);
    }

    // ── Plan ───────────────────────────────────────────────────────────────────

    @PUT
    @Path("/backup/plans/")

View on GitHub (pinned to 62ff490619)

Solutions

  1. Guard the call with error-code handling for ResourceNotFoundException and treat it as 'notifications not configured'
  2. Skip GetBackupVaultNotifications entirely when running against the emulator
  3. For real notification behavior, run against actual AWS Backup — the emulator does not model it

Example fix

// before
GetBackupVaultNotificationsResponse resp = backup.getBackupVaultNotifications(
    GetBackupVaultNotificationsRequest.builder().backupVaultName(vault).build());

// after
try {
    GetBackupVaultNotificationsResponse resp = backup.getBackupVaultNotifications(
        GetBackupVaultNotificationsRequest.builder().backupVaultName(vault).build());
} catch (ResourceNotFoundException e) {
    // notifications are never configured in the emulator — treat as absent
}
Defensive patterns

Strategy: try-catch

Try / catch

catch (ResourceNotFoundException e) { notifications = Optional.empty(); // documented not-configured signal }

Prevention

When it happens

Trigger: Calling GetBackupVaultNotifications for any vault name, configured or not — the emulator has no PutBackupVaultNotifications state, so the response is unconditional.

Common situations: Audit or drift-detection tooling enumerating vault notification configs against the emulator; porting backup-alarm workflows that rely on SNS notifications, which the emulator does not implement.

Related errors


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