HttpRequestMessageExtensionsCreateErrorResponse Method

Creates the error response for an exception. This method will also add the .Data attributes, if any.

Namespace:  Dundas.BI.WebApi
Assembly:  Dundas.BI.WebApi (in Dundas.BI.WebApi.dll) Version: 2.0.0.0 (9.0.0.1000)
Syntax
public static HttpResponseMessage CreateErrorResponse(
	this HttpRequestMessage request,
	HttpStatusCode statusCode,
	Exception exception
)

Parameters

request
Type: System.Net.HttpHttpRequestMessage
The request.
statusCode
Type: System.NetHttpStatusCode
The status code.
exception
Type: SystemException
The exception.

Return Value

Type: HttpResponseMessage
The response message.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type HttpRequestMessage. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also