Package io.hanko.sdk.exception
Class HankoApiException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.hanko.sdk.exception.HankoException
io.hanko.sdk.exception.HankoApiException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
HankoAuthenticationException
,HankoNotFoundException
Exception occurring when the Hanko API does not respond with a status code in the range 2xx.
- See Also:
- Serialized Form
-
Constructor Summary
ConstructorsConstructorDescriptionHankoApiException(String message)
Construct a new HankoApiException with the specified detail message.HankoApiException(String message, Integer status, String requestPath, String content)
Construct a new HankoApiException with the specified detail message, the Hanko API response status, the original request path and the Hanko API response content. -
Method Summary
Modifier and TypeMethodDescriptionGet the Hanko API response content.Get the original request path.Get the Hanko API HTTP response status.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HankoApiException
Construct a new HankoApiException with the specified detail message.- Parameters:
message
- the detail message
-
HankoApiException
Construct a new HankoApiException with the specified detail message, the Hanko API response status, the original request path and the Hanko API response content.- Parameters:
message
- the detail messagestatus
- the Hanko API HTTP response statusrequestPath
- the original request pathcontent
- the Hanko API response content
-
-
Method Details
-
getContent
Get the Hanko API response content.- Returns:
- the Hanko API response content as a String
-
getStatus
Get the Hanko API HTTP response status.- Returns:
- the Hanko API HTTP response status as an Integer
-
getRequestPath
Get the original request path.- Returns:
- the original request path as a String
-