Search Results for

    Show / Hide Table of Contents

    Class ApiException

    Thrown when the Seclai API returns a non-success HTTP status code. Contains the status code, HTTP method, request URL, and raw response body.

    Inheritance
    object
    Exception
    ApiException
    ApiValidationException
    Implements
    ISerializable
    Inherited Members
    Exception.GetBaseException()
    Exception.GetObjectData(SerializationInfo, StreamingContext)
    Exception.GetType()
    Exception.ToString()
    Exception.Data
    Exception.HelpLink
    Exception.HResult
    Exception.InnerException
    Exception.Message
    Exception.Source
    Exception.StackTrace
    Exception.TargetSite
    Exception.SerializeObjectState
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Seclai.Exceptions
    Assembly: Seclai.dll
    Syntax
    public class ApiException : Exception, ISerializable

    Constructors

    ApiException(HttpStatusCode, string, Uri, string?)

    Creates an ApiException from an API error response.

    Declaration
    public ApiException(HttpStatusCode statusCode, string method, Uri url, string? responseBody)
    Parameters
    Type Name Description
    HttpStatusCode statusCode
    string method
    Uri url
    string responseBody

    Properties

    Method

    The HTTP method of the failed request (e.g. "GET", "POST").

    Declaration
    public string Method { get; }
    Property Value
    Type Description
    string

    ResponseBody

    The raw response body, if available.

    Declaration
    public string? ResponseBody { get; }
    Property Value
    Type Description
    string

    StatusCode

    The HTTP status code returned by the API.

    Declaration
    public HttpStatusCode StatusCode { get; }
    Property Value
    Type Description
    HttpStatusCode

    Url

    The request URL.

    Declaration
    public Uri Url { get; }
    Property Value
    Type Description
    Uri

    Implements

    ISerializable
    In this article
    Back to top Generated by DocFX