Share via


ODataOutputContext.WriteError(ODataError, Boolean) Method

Definition

Writes an ODataError as the message payload.

public virtual void WriteError (Microsoft.OData.ODataError odataError, bool includeDebugInformation);
abstract member WriteError : Microsoft.OData.ODataError * bool -> unit
override this.WriteError : Microsoft.OData.ODataError * bool -> unit
Public Overridable Sub WriteError (odataError As ODataError, includeDebugInformation As Boolean)

Parameters

odataError
ODataError

The OData 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.

Remarks

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

Applies to