TypedRest for .NET 1.3.5
build type-safe fluent-style REST API clients
TypedRest.Errors.IErrorHandler Interface Reference

Handles errors in HTTP responses. More...

Inheritance diagram for TypedRest.Errors.IErrorHandler:
TypedRest.Errors.DefaultErrorHandler

Public Member Functions

Task HandleAsync (HttpResponseMessage response)
 Throws appropriate Exceptions based on HTTP status codes and response bodies. More...
 

Detailed Description

Handles errors in HTTP responses.

Member Function Documentation

◆ HandleAsync()

Task TypedRest.Errors.IErrorHandler.HandleAsync ( HttpResponseMessage  response)

Throws appropriate Exceptions based on HTTP status codes and response bodies.

Exceptions
InvalidDataExceptionHttpStatusCode.BadRequest
AuthenticationExceptionHttpStatusCode.Unauthorized
UnauthorizedAccessExceptionHttpStatusCode.Forbidden
KeyNotFoundExceptionHttpStatusCode.NotFound or HttpStatusCode.Gone
InvalidOperationExceptionHttpStatusCode.Conflict, HttpStatusCode.PreconditionFailed or HttpStatusCode.RequestedRangeNotSatisfiable
HttpRequestExceptionOther non-success status code.

Implemented in TypedRest.Errors.DefaultErrorHandler.


The documentation for this interface was generated from the following file: