Skip to content

Commit

Permalink
HAProxy errors: log the instance
Browse files Browse the repository at this point in the history
More debug info!
  • Loading branch information
Nick Craver committed Jul 23, 2018
1 parent 0d4b476 commit 92a91a6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Opserver.Core/Data/HAProxy/HAProxyAdmin.cs
Expand Up @@ -106,7 +106,9 @@ private static async Task<bool> PostAction(Proxy p, Server server, Action action
}
catch (Exception e)
{
Current.LogException(e);
//if (e is WebException we && we.Response is HttpWebResponse hwr && hwr.StatusCode == HttpStatusCode.Unauthorized) return false;
Current.LogException(e.AddLoggedData("Instance", instance.Name)
.AddLoggedData("InstanceUrl", instance.Url));
return false;
}
}
Expand Down Expand Up @@ -145,4 +147,4 @@ public enum Action
KillSessions = 1 << 13,
// ReSharper restore InconsistentNaming
}
}
}

0 comments on commit 92a91a6

Please sign in to comment.