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
messagestringThe full diagnostic message for logging.
codeTwirpErrorCodeThe parsed Twirp error code.
twirpMessagestringThe error message from the Twirp response.
statusCodeHttpStatusCodeThe HTTP status code of the response.
Properties
Code
The Twirp error code returned by the server.
public TwirpErrorCode Code { get; }
Property Value
StatusCode
The HTTP status code of the response.
public HttpStatusCode StatusCode { get; }
Property Value
TwirpMessage
The error message from the Twirp response's msg field.
public string TwirpMessage { get; }