Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update exception and documentation links to be human readable #1259

Merged
merged 2 commits into from
Apr 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Grpc.Net.Client/GrpcChannelOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public sealed class GrpcChannelOptions
/// <para>
/// The underlying <see cref="System.Net.Http.HttpClient"/> used by the channel automatically loads root certificates
/// from the operating system certificate store.
/// Client certificates should be configured on HttpClient. See https://aka.ms/AA6we64 for details.
/// Client certificates should be configured on HttpClient. See https://aka.ms/aspnet/grpc/certauth for details.
/// </para>
/// </remarks>
public ChannelCredentials? Credentials { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public override void SetSslCredentials(object state, string rootCertificates, Ke
throw new InvalidOperationException(
$"{nameof(SslCredentials)} with non-null arguments is not supported by {nameof(GrpcChannel)}. " +
$"{nameof(GrpcChannel)} uses HttpClient to make gRPC calls and HttpClient automatically loads root certificates from the operating system certificate store. " +
$"Client certificates should be configured on HttpClient. See https://aka.ms/AA6we64 for details.");
$"Client certificates should be configured on HttpClient. See https://aka.ms/aspnet/grpc/certauth for details.");
}

IsSecure = true;
Expand Down
2 changes: 1 addition & 1 deletion src/Grpc.Net.Client/Internal/GrpcProtocolHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public static Status GetResponseStatus(HttpResponseMessage httpResponse, bool is
}
if (isWinHttp)
{
detail += " Using gRPC with WinHttp has Windows and package version requirements. See https://aka.ms/pzkMXDs for details.";
detail += " Using gRPC with WinHttp has Windows and package version requirements. See https://aka.ms/aspnet/grpc/netstandard for details.";
}

status = new Status(StatusCode.Cancelled, detail);
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/HttpHandlerFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static HttpMessageHandler CreatePrimaryHandler()
$"gRPC requires extra configuration on .NET implementations that don't support gRPC over HTTP/2. " +
$"An HTTP provider must be specified using {nameof(GrpcChannelOptions)}.{nameof(GrpcChannelOptions.HttpHandler)}." +
$"The configured HTTP provider must either support HTTP/2 or be configured to use gRPC-Web. " +
$"See https://aka.ms/pzkMXDs for details.";
$"See https://aka.ms/aspnet/grpc/netstandard for details.";
throw new PlatformNotSupportedException(message);
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion test/Grpc.Net.Client.Tests/GetTrailersTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public async Task AsyncUnaryCall_NoTrailers_WinHttpHandler_ThrowsError()

// Assert
Assert.AreEqual(StatusCode.Cancelled, ex.StatusCode);
Assert.AreEqual("No grpc-status found on response. Using gRPC with WinHttp has Windows and package version requirements. See https://aka.ms/pzkMXDs for details.", ex.Status.Detail);
Assert.AreEqual("No grpc-status found on response. Using gRPC with WinHttp has Windows and package version requirements. See https://aka.ms/aspnet/grpc/netstandard for details.", ex.Status.Detail);
Assert.AreEqual(0, ex.Trailers.Count);
}
#endif
Expand Down
4 changes: 2 additions & 2 deletions test/Grpc.Net.Client.Tests/GrpcChannelTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void Build_SslCredentialsWithArgs_ThrowsError()
Assert.AreEqual(
"SslCredentials with non-null arguments is not supported by GrpcChannel. " +
"GrpcChannel uses HttpClient to make gRPC calls and HttpClient automatically loads root certificates from the operating system certificate store. " +
"Client certificates should be configured on HttpClient. See https://aka.ms/AA6we64 for details.", ex.Message);
"Client certificates should be configured on HttpClient. See https://aka.ms/aspnet/grpc/certauth for details.", ex.Message);
}

[Test]
Expand Down Expand Up @@ -207,7 +207,7 @@ public void Build_NoHttpProviderOnNetFx_Throw()
$"gRPC requires extra configuration on .NET implementations that don't support gRPC over HTTP/2. " +
$"An HTTP provider must be specified using {nameof(GrpcChannelOptions)}.{nameof(GrpcChannelOptions.HttpHandler)}." +
$"The configured HTTP provider must either support HTTP/2 or be configured to use gRPC-Web. " +
$"See https://aka.ms/pzkMXDs for details.";
$"See https://aka.ms/aspnet/grpc/netstandard for details.";

Assert.AreEqual(message, ex.Message);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public void CreateClient_NoPrimaryHandlerNetStandard_ThrowError()
var ex = Assert.Throws<PlatformNotSupportedException>(() => clientFactory.CreateClient<TestGreeterClient>(nameof(TestGreeterClient)))!;

// Assert
Assert.AreEqual(@"gRPC requires extra configuration on .NET implementations that don't support gRPC over HTTP/2. An HTTP provider must be specified using GrpcChannelOptions.HttpHandler.The configured HTTP provider must either support HTTP/2 or be configured to use gRPC-Web. See https://aka.ms/pzkMXDs for details.", ex.Message);
Assert.AreEqual(@"gRPC requires extra configuration on .NET implementations that don't support gRPC over HTTP/2. An HTTP provider must be specified using GrpcChannelOptions.HttpHandler.The configured HTTP provider must either support HTTP/2 or be configured to use gRPC-Web. See https://aka.ms/aspnet/grpc/netstandard for details.", ex.Message);
}
#endif

Expand Down