C# Class Stumps.Web.ErrorStatusCodeHandler

A class that provides an implementation of the Nancy status code handler.
Inheritance: IStatusCodeHandler
Show file Open project: Cayan-LLC/stumps

Public Methods

Method Description
Handle ( HttpStatusCode statusCode, Nancy.NancyContext context ) : void

Handle the error code.

HandlesStatusCode ( HttpStatusCode statusCode, Nancy context ) : bool

Check if the error handler can handle errors of the provided status code.

Private Methods

Method Description
ShouldReturnFriendlyErrorPage ( Nancy.NancyContext context ) : bool

Determines if a friendly error page should be returned for a T:Nancy.NancyContext.

Method Details

Handle() public method

Handle the error code.
is null.
public Handle ( HttpStatusCode statusCode, Nancy.NancyContext context ) : void
statusCode HttpStatusCode The HTTP status code.
context Nancy.NancyContext Current context of the request.
return void

HandlesStatusCode() public method

Check if the error handler can handle errors of the provided status code.
public HandlesStatusCode ( HttpStatusCode statusCode, Nancy context ) : bool
statusCode HttpStatusCode The HTTP status code.
context Nancy The instance of the current request.
return bool