Skip to main content

HttpError

Assembly: ServiceStack.dll
View Source
Declaration
public class HttpError : Exception, ISerializable, _Exception, IHttpError, IHttpResult, IHasOptions, IResponseStatusConvertible, IHasErrorCode, IHasResponseStatus

Properties

ErrorCode

View Source
Declaration
public string ErrorCode { get; set; }

StackTrace

View Source
Declaration
public string StackTrace { get; set; }

ContentType

View Source
Declaration
public string ContentType { get; set; }

Headers

View Source
Declaration
public Dictionary<string, string> Headers { get; }

Cookies

View Source
Declaration
public List<Cookie> Cookies { get; }

Status

View Source
Declaration
public int Status { get; set; }

StatusCode

View Source
Declaration
public HttpStatusCode StatusCode { get; set; }

StatusDescription

View Source
Declaration
public string StatusDescription { get; set; }

Response

View Source
Declaration
public object Response { get; set; }

ResponseFilter

View Source
Declaration
public IContentTypeWriter ResponseFilter { get; set; }

RequestContext

View Source
Declaration
public IRequest RequestContext { get; set; }

PaddingLength

View Source
Declaration
public int PaddingLength { get; set; }

ResultScope

View Source
Declaration
public Func<IDisposable> ResultScope { get; set; }

Options

View Source
Declaration
public IDictionary<string, string> Options { get; }

ResponseStatus

View Source
Declaration
public ResponseStatus ResponseStatus { get; set; }

Methods

GetFieldErrors()

View Source
Declaration
public List<ResponseError> GetFieldErrors()
Returns

System.Collections.Generic.List<ServiceStack.ResponseError>

NotFound(String)

View Source
Declaration
public static Exception NotFound(string message)
Returns

System.Exception

Parameters
TypeName
System.Stringmessage

Unauthorized(String)

View Source
Declaration
public static Exception Unauthorized(string message)
Returns

System.Exception

Parameters
TypeName
System.Stringmessage

Conflict(String)

View Source
Declaration
public static Exception Conflict(string message)
Returns

System.Exception

Parameters
TypeName
System.Stringmessage

Forbidden(String)

View Source
Declaration
public static Exception Forbidden(string message)
Returns

System.Exception

Parameters
TypeName
System.Stringmessage

MethodNotAllowed(String)

View Source
Declaration
public static Exception MethodNotAllowed(string message)
Returns

System.Exception

Parameters
TypeName
System.Stringmessage

BadRequest(String)

View Source
Declaration
public static Exception BadRequest(string message)
Returns

System.Exception

Parameters
TypeName
System.Stringmessage

BadRequest(String, String)

View Source
Declaration
public static Exception BadRequest(string errorCode, string message)
Returns

System.Exception

Parameters
TypeName
System.StringerrorCode
System.Stringmessage

PreconditionFailed(String)

View Source
Declaration
public static Exception PreconditionFailed(string message)
Returns

System.Exception

Parameters
TypeName
System.Stringmessage

ExpectationFailed(String)

View Source
Declaration
public static Exception ExpectationFailed(string message)
Returns

System.Exception

Parameters
TypeName
System.Stringmessage

NotImplemented(String)

View Source
Declaration
public static Exception NotImplemented(string message)
Returns

System.Exception

Parameters
TypeName
System.Stringmessage

ServiceUnavailable(String)

View Source
Declaration
public static Exception ServiceUnavailable(string message)
Returns

System.Exception

Parameters
TypeName
System.Stringmessage

Validation(String, String, String)

View Source
Declaration
public static Exception Validation(string errorCode, string errorMessage, string fieldName)
Returns

System.Exception

Parameters
TypeName
System.StringerrorCode
System.StringerrorMessage
System.StringfieldName

ToResponseStatus()

View Source
Declaration
public ResponseStatus ToResponseStatus()
Returns

ServiceStack.ResponseStatus

GetException(Object)

View Source
Declaration
public static Exception GetException(object responseDto)
Returns

System.Exception

Parameters
TypeName
System.ObjectresponseDto

Implements