CryptoApiException¶
Namespace CryptoService.Sdk.
The server answered with a status outside 2xx. CryptoApiException.Problem is its RFC 9457 problem; an answer without one (a proxy's HTML page, an empty body) becomes an about:blank problem for the status.
Remarks¶
The message names the status, the problem type and its title only. The ProblemDetails.Detail is kept in CryptoApiException.Problem for the caller to inspect.
Methods¶
CryptoApiException()¶
Creates an exception with a default message and an empty problem.
CryptoApiException(Int32, ProblemDetails)¶
Creates an exception for an error answer.
| Parameter | Description |
|---|---|
statusCode |
The HTTP status code of the answer. |
problem |
The server's problem, or the about:blank one built for a body that is not a problem. |
| Exception | When |
|---|---|
ArgumentNullException |
problem is null. |
CryptoApiException(String)¶
Creates an exception with the given message and an empty problem.
| Parameter | Description |
|---|---|
message |
What went wrong. |
CryptoApiException(String, Exception)¶
Creates an exception with a message, its cause and an empty problem.
| Parameter | Description |
|---|---|
message |
What went wrong. |
innerException |
The exception that caused this one. |
Properties¶
Problem¶
The RFC 9457 problem the server answered with.
StatusCode¶
The HTTP status code of the answer, or 0 when there was none.