Class KeycloakHttpClientException
- Namespace
- Keycloak.AuthServices.Sdk
- Assembly
- Keycloak.AuthServices.Sdk.dll
Represents an exception that is thrown when an HTTP request to the Keycloak fails.
public class KeycloakHttpClientException : Exception, ISerializable
- Inheritance
-
KeycloakHttpClientException
- Implements
- Inherited Members
Constructors
KeycloakHttpClientException(string, int, string, ErrorResponse, Exception?)
Initializes a new instance of the KeycloakHttpClientException class with the specified parameters.
public KeycloakHttpClientException(string message, int statusCode, string httpResponse, ErrorResponse response, Exception? innerException)
Parameters
messagestringThe error message.
statusCodeintThe status code of the HTTP response.
httpResponsestringThe raw HTTP response.
responseErrorResponseThe deserialized error response from the Keycloak server.
innerExceptionExceptionThe inner exception that caused this exception, or
nullif no inner exception is specified.
Properties
HttpResponse
Gets the raw HTTP response.
public string HttpResponse { get; }
Property Value
Response
Gets the deserialized error response from the Keycloak server.
public ErrorResponse Response { get; }
Property Value
StatusCode
Gets the status code of the HTTP response.
public int StatusCode { get; }
Property Value
Methods
ToString()
Returns a string that represents the current object, including the HTTP response.
public override string ToString()
Returns
- string
A string that represents the current object, including the HTTP response.