{"record":{"id":"77f8834e4c5de700","repo":"goharbor/harbor","slug":"single-active-replication-is-not-allowed-for-event","errorCode":null,"errorMessage":"single active replication is not allowed for event_based triggers","messagePattern":"single active replication is not allowed for event_based triggers","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"src/server/v2.0/handler/replication.go","lineNumber":119,"sourceCode":"\t\t\t\tCron: params.Policy.Trigger.TriggerSettings.Cron,\n\t\t\t}\n\t\t}\n\t}\n\tif params.Policy.Speed != nil {\n\t\tif *params.Policy.Speed < 0 {\n\t\t\t*params.Policy.Speed = 0\n\t\t}\n\t\tpolicy.Speed = *params.Policy.Speed\n\t}\n\n\tif params.Policy.CopyByChunk != nil {\n\t\tpolicy.CopyByChunk = *params.Policy.CopyByChunk\n\t}\n\n\tif params.Policy.SingleActiveReplication != nil {\n\t\t// Validate and assign SingleActiveReplication only for non-event_based triggers\n\t\tif params.Policy.Trigger != nil && params.Policy.Trigger.Type == model.TriggerTypeEventBased && *params.Policy.SingleActiveReplication {\n\t\t\treturn r.SendError(ctx, fmt.Errorf(\"single active replication is not allowed for event_based triggers\"))\n\t\t}\n\t\tpolicy.SingleActiveReplication = *params.Policy.SingleActiveReplication\n\t}\n\n\tid, err := r.ctl.CreatePolicy(ctx, policy)\n\tif err != nil {\n\t\treturn r.SendError(ctx, err)\n\t}\n\tlocation := fmt.Sprintf(\"%s/%d\", strings.TrimSuffix(params.HTTPRequest.URL.Path, \"/\"), id)\n\treturn operation.NewCreateReplicationPolicyCreated().WithLocation(location)\n}\n\nfunc (r *replicationAPI) UpdateReplicationPolicy(ctx context.Context, params operation.UpdateReplicationPolicyParams) middleware.Responder {\n\tif err := r.RequireSystemAccess(ctx, rbac.ActionUpdate, rbac.ResourceReplicationPolicy); err != nil {\n\t\treturn r.SendError(ctx, err)\n\t}\n\tpolicy := &repctlmodel.Policy{\n\t\tID:                params.ID,","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/server/v2.0/handler/replication.go#L101-L137","documentation":"Error \"single active replication is not allowed for event_based triggers\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/server/v2.0/handler/replication.go:119 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}