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
statusCodeHttpStatusCodeThe HTTP status code.
apiErrorstringThe
errorfield of the response body, or the raw body.pathstringThe 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
StatusCode
The HTTP status code.
public HttpStatusCode StatusCode { get; }