Skip to content

Commit 01fc412

Browse files
authored
Improve error message for network report summary (#640)
1 parent a5954c4 commit 01fc412

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cli/cmd/network_report.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Output formats:
3131
Example: `# Get full network traffic report
3232
replicated network report <network-id>
3333
34-
# Get aggregated summary with statistics
34+
# Get aggregated summary with statistics. Only available for networks that have been terminated.
3535
replicated network report <network-id> --summary
3636
3737
# Watch for new network events in real-time
@@ -147,6 +147,8 @@ func (r *runners) getNetworkReportSummary(ctx context.Context) error {
147147
summary, err := r.kotsAPI.GetNetworkReportSummary(ctx, r.args.networkReportID)
148148
if errors.Cause(err) == platformclient.ErrForbidden {
149149
return ErrCompatibilityMatrixTermsNotAccepted
150+
} else if errors.Cause(err) == platformclient.ErrNotFound {
151+
return fmt.Errorf("network report summary not found for network %s, network must be terminated and events must have been porcessed", r.args.networkReportID)
150152
} else if err != nil {
151153
return errors.Wrap(err, "get network report summary")
152154
}

0 commit comments

Comments
 (0)