Class HonuaStudioApiException
- Namespace
- Honua.Sdk.Studio.Exceptions
- Assembly
- Honua.Sdk.Studio.dll
Exception thrown when the Honua Studio API returns an error HTTP status code.
public sealed class HonuaStudioApiException : HonuaException, ISerializable
- Inheritance
-
HonuaStudioApiException
- Implements
- Inherited Members
Constructors
HonuaStudioApiException()
Initializes a new instance of the HonuaStudioApiException class.
public HonuaStudioApiException()
HonuaStudioApiException(HttpStatusCode, string, string?, string?, string?)
Initializes a new instance of the HonuaStudioApiException class.
public HonuaStudioApiException(HttpStatusCode statusCode, string message, string? responseBody = null, string? problemTitle = null, string? problemDetail = null)
Parameters
statusCodeHttpStatusCodeThe HTTP status code returned by the server.
messagestringA human-readable error message.
responseBodystringThe raw response body, if available.
problemTitlestringProblem title supplied by the server, if any.
problemDetailstringProblem detail supplied by the server, if any.
HonuaStudioApiException(string)
Initializes a new instance of the HonuaStudioApiException class.
public HonuaStudioApiException(string message)
Parameters
messagestringA human-readable error message.
HonuaStudioApiException(string, Exception)
Initializes a new instance of the HonuaStudioApiException class with an inner exception.
public HonuaStudioApiException(string message, Exception innerException)
Parameters
messagestringA human-readable error message.
innerExceptionExceptionThe inner exception that caused this exception.
Properties
HttpStatus
The HTTP status code associated with the failure, normalized to an int, or null for non-HTTP transports (e.g. gRPC) or failures with no status. Lets callers branch on status uniformly without downcasting to a per-protocol exception type.
public override int? HttpStatus { get; }
Property Value
- int?
ProblemDetail
Problem detail body, when the server returned a problem-details document.
public string? ProblemDetail { get; }
Property Value
ProblemDetails
The RFC 7807 problem document the server returned, or null; protocol-specific detail lives on derived types.
public override HonuaProblemDetails? ProblemDetails { get; }
Property Value
ProblemTitle
Problem detail title, when the server returned a problem-details document.
public string? ProblemTitle { get; }
Property Value
ResponseBody
The raw response body, if available.
public string? ResponseBody { get; }
Property Value
StatusCode
HTTP status code returned by the server.
public HttpStatusCode StatusCode { get; }