floci-io/floci · error · AwsException
ResourceNotFoundException
ResourceNotFoundException
Error message
Export {exportArn} not found. What it means
Thrown by Floci's BCM Data Exports emulator from ListExecutions when the supplied ExportArn does not exist in the export store. The service requires a non-empty ARN and an existing export before scanning its execution records; missing exports yield ResourceNotFoundException. Note the emulator returns HTTP 400 here whereas real AWS uses 404 for this error code.
Source
Thrown at src/main/java/io/github/hectorvent/floci/services/bcmdataexports/BcmDataExportsService.java:191
return null;
}
exportStore.delete(key);
// Also remove any executions tied to this export to avoid orphan records.
String execPrefix = exportArn + "::";
for (String execKey : new ArrayList<>(executionStore.keys())) {
if (execKey.startsWith(execPrefix)) {
executionStore.delete(execKey);
}
}
LOG.infov("Deleted BCM export: {0}", exportArn);
return existing;
}
/** {@code ListExecutions} — returns every recorded execution for the export. */
public List<ExportExecution> listExecutions(String exportArn) {
requireNonEmpty(exportArn, "ExportArn");
if (exportStore.get(exportKey(exportArn)).isEmpty()) {
throw new AwsException("ResourceNotFoundException",
"Export " + exportArn + " not found.", 400);
}
String prefix = exportArn + "::";
return new ArrayList<>(executionStore.scan(key -> key.startsWith(prefix)));
}
/** {@code GetExecution} — returns one execution record. */
public ExportExecution getExecution(String exportArn, String executionId) {
requireNonEmpty(exportArn, "ExportArn");
requireNonEmpty(executionId, "ExecutionId");
return executionStore.get(executionKey(exportArn, executionId))
.orElseThrow(() -> new AwsException("ResourceNotFoundException",
"Execution " + executionId + " not found.", 400));
}
// ── Internal helpers exposed package-private for the emitter (next step) ──
/**View on GitHub (pinned to 62ff490619)
Solutions
- Confirm the export exists via GetExport/ListExports and use its exact exportArn.
- If the export was deleted, stop polling; executions are removed with the export.
- Capture and persist the exportArn returned by CreateExport instead of constructing ARNs manually.
- Recreate the export if the workflow requires execution history.
Example fix
// before
bcm.listExecutions(r -> r.exportArn("arn:aws:bcm-data-exports:us-east-1:123456789012:export/guess"));
// after
String arn = bcm.createExport(r -> r.name("cost").dataQuery(dq).refreshCadence(rc)).exportArn();
bcm.listExecutions(r -> r.exportArn(arn)); Defensive patterns
Strategy: validation
Validate before calling
Optional<String> arn = bcm.listExports().exports().stream()
.map(ExportSummary::exportArn)
.filter(a -> a.equals(candidateArn)).findFirst();
if (arn.isEmpty()) { /* do not poll executions */ } Try / catch
try {
bcm.listExecutions(r -> r.exportArn(arn));
} catch (software.amazon.awssdk.services.bcmdataexports.model.ResourceNotFoundException e) {
// export gone: stop the polling loop
} Prevention
- Persist the exportArn from CreateExport and use it for all subsequent calls.
- DeleteExport should cancel any execution-polling job.
- Never build the ARN by string concatenation.
When it happens
Trigger: bcmDataExportsClient.listExecutions(r -> r.exportArn(arn)) with an ARN of a deleted or never-created export, or an ARN with a wrong export name segment.
Common situations: Polling executions of an export that failed to create earlier in the workflow; using an ARN from a previous emulator session after storage reset; deleting the export then continuing to poll; malformed ARN built by hand.
Related errors
- ValidationException
- ValidationException
- BadRequestException
- ValidationException
- UnsupportedOperationException
AI-assisted analysis of floci-io/floci@62ff490619 (2026-08-14).
Data as JSON: /api/errors/37fb6d3b751effb1.
Report an issue: GitHub.