Skip to content

Commit 4615020

Browse files
committed
Reworded registration exception for clarity
Ported dotnet/aspnetcore#12636
1 parent 849f5ec commit 4615020

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/HeaderPropagationMessageHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage reques
4848
{
4949
var message =
5050
$"The {nameof(HeaderPropagationValues)}.{nameof(HeaderPropagationValues.Headers)} property has not been " +
51-
$"initialized. Register the header propagation middleware by adding 'app.{nameof(HeaderPropagationApplicationBuilderExtensions.UseHeaderPropagation)}() " +
52-
$"in the 'Configure(...)' method.";
51+
$"initialized. Register the header propagation middleware by adding 'app.{nameof(HeaderPropagationApplicationBuilderExtensions.UseHeaderPropagation)}()' " +
52+
$"in the 'Configure(...)' method. Header propagation can only be used within the context of an HTTP request.";
5353
throw new InvalidOperationException(message);
5454
}
5555

0 commit comments

Comments
 (0)