using System.Text.Json.Serialization;
namespace AnthropicClient.Models;
///
/// Represents an error response from the Anthropic API.
///
public class AnthropicError
{
///
/// The type of the error.
///
public string Type { get; init; } = "error";
///
/// The error object.
///
public Error Error { get; init; } = new ApiError();
[JsonConstructor]
internal AnthropicError()
{
}
///
/// Initializes a new instance of the class.
///
/// The error as an object.
/// A new instance of the class.
public AnthropicError(Error error)
{
Error = error;
}
}