Clean logging messages in AppriseProxy

This commit is contained in:
Bogdan 2025-05-01 12:12:42 +03:00
parent 84b672e617
commit 8081f13052

View file

@ -91,7 +91,7 @@ public ValidationFailure Test(AppriseSettings settings)
{
if (httpException.Response.StatusCode == HttpStatusCode.Unauthorized)
{
_logger.Error(ex, $"HTTP Auth credentials are invalid: {0}", ex.Message);
_logger.Error(ex, "HTTP Auth credentials are invalid: {0}", ex.Message);
return new ValidationFailure("AuthUsername", $"HTTP Auth credentials are invalid: {ex.Message}");
}
@ -99,7 +99,7 @@ public ValidationFailure Test(AppriseSettings settings)
{
var error = Json.Deserialize<AppriseError>(httpException.Response.Content);
_logger.Error(ex, $"Unable to send test message. Response from API: {0}", error.Error);
_logger.Error(ex, "Unable to send test message. Response from API: {0}", error.Error);
return new ValidationFailure(string.Empty, $"Unable to send test message. Response from API: {error.Error}");
}