Table of Contents

Class SignalApiException

Namespace
Signal.Application.Abstractions
Assembly
Signal.Application.dll

The signal-cli-rest-api answered with a non-success status code.

public sealed class SignalApiException : Exception, ISerializable
Inheritance
SignalApiException
Implements
Inherited Members

Remarks

Connection failures surface as HttpRequestException and timeouts as TimeoutException or OperationCanceledException; this exception means the API was reached but refused the request.

Constructors

SignalApiException(HttpStatusCode, string?, string?)

The signal-cli-rest-api answered with a non-success status code.

public SignalApiException(HttpStatusCode statusCode, string? apiError, string? path = null)

Parameters

statusCode HttpStatusCode

The HTTP status code.

apiError string

The error field of the response body, or the raw body.

path string

The request path (without query string).

Remarks

Connection failures surface as HttpRequestException and timeouts as TimeoutException or OperationCanceledException; this exception means the API was reached but refused the request.

Properties

ApiError

The error field of the API response (e.g. Unregistered user), if any.

public string? ApiError { get; }

Property Value

string

StatusCode

The HTTP status code.

public HttpStatusCode StatusCode { get; }

Property Value

HttpStatusCode