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
Type | Name |
---|---|
System.String | message |
Unauthorized(String)
View Source
Declaration
public static Exception Unauthorized(string message)
Returns
System.Exception
Parameters
Type | Name |
---|---|
System.String | message |
Conflict(String)
View Source
Declaration
public static Exception Conflict(string message)
Returns
System.Exception
Parameters
Type | Name |
---|---|
System.String | message |
Forbidden(String)
View Source
Declaration
public static Exception Forbidden(string message)
Returns
System.Exception
Parameters
Type | Name |
---|---|
System.String | message |
MethodNotAllowed(String)
View Source
Declaration
public static Exception MethodNotAllowed(string message)
Returns
System.Exception
Parameters
Type | Name |
---|---|
System.String | message |
BadRequest(String)
View Source
Declaration
public static Exception BadRequest(string message)
Returns
System.Exception
Parameters
Type | Name |
---|---|
System.String | message |
BadRequest(String, String)
View Source
Declaration
public static Exception BadRequest(string errorCode, string message)
Returns
System.Exception
Parameters
Type | Name |
---|---|
System.String | errorCode |
System.String | message |
PreconditionFailed(String)
View Source
Declaration
public static Exception PreconditionFailed(string message)
Returns
System.Exception
Parameters
Type | Name |
---|---|
System.String | message |
ExpectationFailed(String)
View Source
Declaration
public static Exception ExpectationFailed(string message)
Returns
System.Exception
Parameters
Type | Name |
---|---|
System.String | message |
NotImplemented(String)
View Source
Declaration
public static Exception NotImplemented(string message)
Returns
System.Exception
Parameters
Type | Name |
---|---|
System.String | message |
ServiceUnavailable(String)
View Source
Declaration
public static Exception ServiceUnavailable(string message)
Returns
System.Exception
Parameters
Type | Name |
---|---|
System.String | message |
Validation(String, String, String)
View Source
Declaration
public static Exception Validation(string errorCode, string errorMessage, string fieldName)
Returns
System.Exception
Parameters
Type | Name |
---|---|
System.String | errorCode |
System.String | errorMessage |
System.String | fieldName |
ToResponseStatus()
View Source
Declaration
public ResponseStatus ToResponseStatus()
Returns
GetException(Object)
View Source
Declaration
public static Exception GetException(object responseDto)
Returns
System.Exception
Parameters
Type | Name |
---|---|
System.Object | responseDto |
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.InteropServices._Exception
- ServiceStack.Web.IHttpError
- ServiceStack.Web.IHttpResult
- ServiceStack.Web.IHasOptions
- ServiceStack.Model.IResponseStatusConvertible
- ServiceStack.IHasErrorCode
- ServiceStack.IHasResponseStatus