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
message
stringThe error message.
statusCode
intThe status code of the HTTP response.
httpResponse
stringThe raw HTTP response.
response
ErrorResponseThe deserialized error response from the Keycloak server.
innerException
ExceptionThe inner exception that caused this exception, or
null
if 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.