mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-04-15 07:16:34 +00:00
Merge pull request #190 from MikaelSmith/error-on-connect-fail
Report errors connecting to the database
This commit is contained in:
@@ -39,6 +39,12 @@ func analyzePostgres(analyzer *troubleshootv1beta1.DatabaseAnalyze, getCollected
|
||||
IconURI: "https://troubleshoot.sh/images/analyzer-icons/postgres-analyze.svg",
|
||||
}
|
||||
|
||||
if databaseConnection.Error != "" {
|
||||
result.IsFail = true
|
||||
result.Message = databaseConnection.Error
|
||||
return result, nil
|
||||
}
|
||||
|
||||
for _, outcome := range analyzer.Outcomes {
|
||||
if outcome.Fail != nil {
|
||||
if outcome.Fail.When == "" {
|
||||
|
||||
Reference in New Issue
Block a user