Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Correct log message for storing context to project mapping
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Grimmer <andreas.grimmer@dynatrace.com>
  • Loading branch information
agrimmer committed Aug 30, 2021
1 parent 0f28589 commit 4fc0c94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mongodb-datastore/handlers/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ func storeContextToProjectMapping(logger *keptncommon.Logger, event *models.Kept
if err != nil {
if writeErr, ok := err.(mongo.WriteException); ok {
if len(writeErr.WriteErrors) > 0 && writeErr.WriteErrors[0].Code == 11000 { // 11000 = duplicate key error
logger.Error("Mapping " + event.Shkeptncontext + "->" + collectionName + " already exists in collection")
logger.Info("Mapping " + event.Shkeptncontext + "->" + collectionName + " already exists in collection")
}
} else {
err := fmt.Errorf("Failed to store mapping "+event.Shkeptncontext+"->"+collectionName+": %v", err.Error())
Expand Down

0 comments on commit 4fc0c94

Please sign in to comment.