Skip to content

Commit

Permalink
fix: Log underlying error when Dynatrace generation check fails
Browse files Browse the repository at this point in the history
If the DT generation validation failed with an expected (non HTTP code) error, we
previously swalled the actual error completely, making this case impossible to
debug based on the logs alone. Thus the error is now included in the log.
  • Loading branch information
UnseenWizzard committed Mar 20, 2023
1 parent 70089b3 commit e07ecd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/monaco/cmdutils/cmdutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func isClassicEnvironment(env manifest.EnvironmentDefinition) bool {
log.Error(err.Error())
}
} else {
log.Error("Could not connect to environment %q (%s)", env.Name, env.URL.Value)
log.Error("Could not connect to environment %q (%s): %v", env.Name, env.URL.Value, err)
}
return false
}
Expand All @@ -85,7 +85,7 @@ func isPlatformEnvironment(env manifest.EnvironmentDefinition) bool {
log.Error(err.Error())
}
} else {
log.Error("Could not connect to environment %q (%s)", env.Name, env.URL.Value)
log.Error("Could not connect to environment %q (%s): %v", env.Name, env.URL.Value, err)
}
return false
}
Expand Down

0 comments on commit e07ecd3

Please sign in to comment.