openai/openai-dotnet

Public

mirrored from https://github.com/openai/openai-dotnetAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
OpenAI_2.0.0-beta.1

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/Generated/Internal/ErrorResult.cs

23lines · modepreview

// <auto-generated/>

#nullable disable

using System.ClientModel;
using System.ClientModel.Primitives;

namespace OpenAI
{
    internal class ErrorResult<T> : ClientResult<T>
    {
        private readonly PipelineResponse _response;
        private readonly ClientResultException _exception;

        public ErrorResult(PipelineResponse response, ClientResultException exception) : base(default, response)
        {
            _response = response;
            _exception = exception;
        }

        public override T Value => throw _exception;
    }
}