diff --git a/digicert-certcentral-caplugin/Models/Error.cs b/digicert-certcentral-caplugin/Models/Error.cs index e963096..013f014 100644 --- a/digicert-certcentral-caplugin/Models/Error.cs +++ b/digicert-certcentral-caplugin/Models/Error.cs @@ -15,6 +15,13 @@ public class Error [JsonProperty("message")] public string message { get; set; } + + public override string ToString() + { + if (string.IsNullOrEmpty(code)) return message ?? string.Empty; + if (string.IsNullOrEmpty(message)) return code; + return $"{code}: {message}"; + } } public class Errors