EnableQueryAttribute.CreateErrorResponse(String, Exception) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Create an error response.
public static Microsoft.AspNetCore.Mvc.SerializableError CreateErrorResponse (string message, Exception exception = default);
static member CreateErrorResponse : string * Exception -> Microsoft.AspNetCore.Mvc.SerializableError
Public Shared Function CreateErrorResponse (message As String, Optional exception As Exception = Nothing) As SerializableError
Parameters
- message
- String
The message of the error.
- exception
- Exception
The error exception if any.
Returns
A SerializableError.
Remarks
This function is recursive.