Jaa


EnableQueryAttribute.CreateErrorResponse(String, Exception) Method

Definition

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.

Applies to