diff --git a/src/Console/Handler/Handler.Handler.cs b/src/Console/Handler/Handler.Handler.cs index a675746..761d5fd 100644 --- a/src/Console/Handler/Handler.Handler.cs +++ b/src/Console/Handler/Handler.Handler.cs @@ -54,13 +54,17 @@ private async ValueTask>> PingAsync(PingIn input, Can return Failure.Create("An unsuccessful HTTP request"); } - var containedMessage = input.ContainedMessage; - if (string.IsNullOrWhiteSpace(containedMessage) || httpResponseBody.Contains(containedMessage, StringComparison.InvariantCulture)) + if (string.IsNullOrWhiteSpace(input.ContainedMessage)) { return Result.Success(default); } - return Failure.Create("Response does not contain the required message"); + if (httpResponseBody.Contains(input.ContainedMessage, StringComparison.InvariantCulture)) + { + return Result.Success(default); + } + + return Failure.Create($"Response does not contain required message '{input.ContainedMessage}'"); } catch (OperationCanceledException ex) {