Jaa


ODataOutputContext.WriteErrorAsync(ODataError, Boolean) Method

Definition

Asynchronously writes an ODataError as the message payload.

public virtual System.Threading.Tasks.Task WriteErrorAsync (Microsoft.OData.ODataError odataError, bool includeDebugInformation);
abstract member WriteErrorAsync : Microsoft.OData.ODataError * bool -> System.Threading.Tasks.Task
override this.WriteErrorAsync : Microsoft.OData.ODataError * bool -> System.Threading.Tasks.Task
Public Overridable Function WriteErrorAsync (odataError As ODataError, includeDebugInformation As Boolean) As Task

Parameters

odataError
ODataError

The error to write.

includeDebugInformation
Boolean

A flag indicating whether debug information (e.g., the inner error from the odataError) should be included in the payload. This should only be used in debug scenarios.

Returns

A task representing the asynchronous operation of writing the error.

Remarks

It is the responsibility of this method to flush the output before the task finishes.

Applies to