-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Net.HttpblockingMarks issues that we want to fast track in order to unblock other important workMarks issues that we want to fast track in order to unblock other important work
Milestone
Description
We just merged a new API adding an HttpRequestError property to HttpRequestException.
public HttpRequestException(string? message, Exception? inner = null, HttpStatusCode? statusCode = null, HttpRequestError? httpRequestError = null);
public HttpRequestError? HttpRequestError { get; }There is controversy over HttpRequestError, in particular that it's a Nullable<HttpRequestError> when HttpRequestError.Unknown also exists. There are then two different ways to communicate that a meaningful HttpRequestError value could not be provided.
I propose the above be changed to instead be:
public HttpRequestException(HttpRequestError httpRequestError, string? message = null, Exception? inner = null, HttpStatusCode? statusCode = null);
public HttpRequestError HttpRequestError { get; }- HttpRequestError parameter to the ctor is moved to be first
- message is given a nullable default value
- HttpRequestError property is made non-nullable
terrajobst
Metadata
Metadata
Assignees
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Net.HttpblockingMarks issues that we want to fast track in order to unblock other important workMarks issues that we want to fast track in order to unblock other important work