C# Class CSharp.Bitbucket.Api.Impl.BitbucketErrorHandler

Implementation of the IResponseErrorHandler that handles errors from Bitbucket's REST API, interpreting them into appropriate exceptions.
Inheritance: Spring.Rest.Client.Support.DefaultResponseErrorHandler
Show file Open project: scottksmith95/CSharp.Bitbucket

Public Methods

Method Description
HandleError ( Uri requestUri, HttpMethod requestMethod, HttpResponseMessage response ) : void

Handles the error in the given response. This method is only called when HasError() method has returned .

This implementation throws appropriate exception if the response status code is a client code error (4xx) or a server code error (5xx).

Private Methods

Method Description
HandleClientErrors ( HttpStatusCode statusCode ) : void
HandleServerErrors ( HttpStatusCode statusCode ) : void

Method Details

HandleError() public method

Handles the error in the given response. This method is only called when HasError() method has returned .
This implementation throws appropriate exception if the response status code is a client code error (4xx) or a server code error (5xx).
public HandleError ( Uri requestUri, HttpMethod requestMethod, HttpResponseMessage response ) : void
requestUri System.Uri The request URI.
requestMethod HttpMethod The request method.
response HttpResponseMessage The response message with the error.
return void