Interface IRosterHttpClientExceptionGenerator
Generates appropriate exceptions for request failures.
Namespace: Microsoft.XboxStudios.SQTech.Roster.Client
Assembly: Microsoft.XboxStudios.SQTech.Roster.Client.Common.dll
Syntax
public interface IRosterHttpClientExceptionGenerator
Methods
View SourceCreateClientExceptionAsync(HttpMethod, Uri, HttpRequestException)
Creates an exception for a given failure.
Declaration
RosterClientHttpException CreateClientExceptionAsync(HttpMethod httpMethod, Uri uri, HttpRequestException hrex)
Parameters
Type | Name | Description |
---|---|---|
HttpMethod | httpMethod | The HTTP method used. |
Uri | uri | The URI of the request. |
HttpRequestException | hrex | An optional exception thrown by the request. |
Returns
Type | Description |
---|---|
RosterClientHttpException | A RosterClientHttpException that can be thrown by your request client. |
CreateClientExceptionFromResponseAsync(HttpResponseMessage, HttpMethod, Uri)
Creates an exception from a non-success HTTP response.
Declaration
Task<RosterClientHttpException> CreateClientExceptionFromResponseAsync(HttpResponseMessage response, HttpMethod httpMethod, Uri uri)
Parameters
Type | Name | Description |
---|---|---|
HttpResponseMessage | response | The HTTP response. |
HttpMethod | httpMethod | The HTTP method used. |
Uri | uri | The URI of the request. |
Returns
Type | Description |
---|---|
Task<RosterClientHttpException> | A RosterClientHttpException that can be thrown by your request client. |