Table of Contents

Class LiveKitApiException

Namespace
LiveKit
Assembly
LiveKit.AspNetCore.ServerSdk.Abstractions.dll

Exception thrown when a LiveKit Twirp API request fails.

Provides structured access to the Twirp error code, message, and HTTP status code returned by the server. Extends HttpRequestException so existing catch blocks continue to work.

public class LiveKitApiException : HttpRequestException, ISerializable
Inheritance
LiveKitApiException
Implements
Inherited Members

Constructors

LiveKitApiException(string, TwirpErrorCode, string, HttpStatusCode)

Initializes a new instance of the LiveKitApiException class.

public LiveKitApiException(string message, TwirpErrorCode code, string twirpMessage, HttpStatusCode statusCode)

Parameters

message string

The full diagnostic message for logging.

code TwirpErrorCode

The parsed Twirp error code.

twirpMessage string

The error message from the Twirp response.

statusCode HttpStatusCode

The HTTP status code of the response.

Properties

Code

The Twirp error code returned by the server.

public TwirpErrorCode Code { get; }

Property Value

TwirpErrorCode

StatusCode

The HTTP status code of the response.

public HttpStatusCode StatusCode { get; }

Property Value

HttpStatusCode

TwirpMessage

The error message from the Twirp response's msg field.

public string TwirpMessage { get; }

Property Value

string