Share via


ResponseError Class

Definition

An error object returned when the model fails to generate a Response.

public class ResponseError : Azure.AI.AgentServer.Contracts.Generated.Common.IUtf8JsonSerializable, System.ClientModel.Primitives.IJsonModel<Azure.AI.AgentServer.Contracts.Generated.OpenAI.ResponseError>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.AgentServer.Contracts.Generated.OpenAI.ResponseError>
type ResponseError = class
    interface IUtf8JsonSerializable
    interface IJsonModel<ResponseError>
    interface IPersistableModel<ResponseError>
Public Class ResponseError
Implements IJsonModel(Of ResponseError), IPersistableModel(Of ResponseError), IUtf8JsonSerializable
Inheritance
ResponseError
Implements

Constructors

Name Description
ResponseError()

Initializes a new instance of ResponseError for deserialization.

ResponseError(ResponseErrorCode, String, IDictionary<String,BinaryData>)

Initializes a new instance of ResponseError.

ResponseError(ResponseErrorCode, String)

Initializes a new instance of ResponseError.

Properties

Name Description
Code

Gets the code.

Message

A human-readable description of the error.

Methods

Name Description
DeserializeResponseError(JsonElement, ModelReaderWriterOptions)
FromResponse(Response)

Deserializes the model from a raw response.

JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
ToRequestContent()

Convert into a RequestContent.

Explicit Interface Implementations

Name Description
IJsonModel<ResponseError>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<ResponseError>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<ResponseError>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<ResponseError>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<ResponseError>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

IUtf8JsonSerializable.Write(Utf8JsonWriter)

Applies to