Skip to content

Add API to get RST_STREAM value from HTTP exceptions #43239

@JamesNK

Description

@JamesNK

Part of User Story: dotnet/core#5493

Background and Motivation

gRPC specifies that RST_STREAM error codes are mapped to gRPC error codes - https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#errors

I believe that today the RST_STREAM value is only exposed in exception message descriptions. The only way to get this value is to parse exception messages, which is pretty awful for the usual reasons.

There should be an exception property with the RST_STREAM error code so it can be used programmatically.

Proposed API

Make this value publicly accessible:

I don't feel strongly that it needs to be an enum. public int ProtocolError { get; } would also be fine.

Metadata

Metadata

Labels

Cost:SWork that requires one engineer up to 1 weekPriority:2Work that is important, but not critical for the releaseTeam:Librariesapi-suggestionEarly API idea and discussion, it is NOT ready for implementationarea-System.Net.Http

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions