ServiceStack.ServiceStackHost.HandleErrorResponse C# (CSharp) Метод

HandleErrorResponse() публичный Метод

public HandleErrorResponse ( IRequest httpReq, IResponse httpRes, HttpStatusCode errorStatus, string errorStatusDescription = null ) : void
httpReq IRequest
httpRes IResponse
errorStatus HttpStatusCode
errorStatusDescription string
Результат void
        public void HandleErrorResponse(IRequest httpReq, IResponse httpRes, HttpStatusCode errorStatus, string errorStatusDescription = null)
        {
            if (httpRes.IsClosed) return;

            httpRes.StatusDescription = errorStatusDescription;

            var handler = GetCustomErrorHandler(errorStatus)
                ?? GlobalHtmlErrorHttpHandler
                ?? GetNotFoundHandler();

            handler.ProcessRequest(httpReq, httpRes, httpReq.OperationName);
        }