Package com.smartcar.sdk
Class SmartcarException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.smartcar.sdk.SmartcarException
-
- All Implemented Interfaces:
java.io.Serializable
public class SmartcarException extends java.lang.ExceptionThrown when the Smartcar API library encounters a problem.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSmartcarException.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SmartcarExceptionFactory(int statusCode, com.google.gson.JsonObject headers, com.google.gson.JsonObject body)static SmartcarExceptionFactory(int statusCode, okhttp3.Headers headers, okhttp3.ResponseBody body)java.lang.StringgetCode()java.lang.StringgetDescription()Returns the description associated with the exception.com.google.gson.JsonArraygetDetail()Returns the error details if available for this exception.java.lang.StringgetDocURL()Returns the documentation URL associated with the exception.java.lang.StringgetMessage()Returns the error messagejava.lang.StringgetRequestId()java.lang.StringgetResolutionType()Returns the resolution type associated with the exception.java.lang.StringgetResolutionUrl()Returns a url associated with the resolution to the exceptionintgetRetryAfter()Returns the retry-after unix timestamp (ms) upon hitting a rate limit error.intgetStatusCode()java.lang.StringgetSuggestedUserMessage()Returns the suggested user message if available for this exception.java.lang.StringgetType()Returns the error type associated with the SmartcarExceptionV2.
-
-
-
Method Detail
-
Factory
public static SmartcarException Factory(int statusCode, com.google.gson.JsonObject headers, com.google.gson.JsonObject body)
-
Factory
public static SmartcarException Factory(int statusCode, okhttp3.Headers headers, okhttp3.ResponseBody body)
-
getMessage
public java.lang.String getMessage()
Returns the error message- Overrides:
getMessagein classjava.lang.Throwable- Returns:
- message
-
getStatusCode
public int getStatusCode()
-
getRequestId
public java.lang.String getRequestId()
-
getType
public java.lang.String getType()
Returns the error type associated with the SmartcarExceptionV2.- Returns:
- the error type
-
getCode
public java.lang.String getCode()
-
getDescription
public java.lang.String getDescription()
Returns the description associated with the exception.- Returns:
- the description
-
getResolutionType
public java.lang.String getResolutionType()
Returns the resolution type associated with the exception.- Returns:
- the resolution type
-
getResolutionUrl
public java.lang.String getResolutionUrl()
Returns a url associated with the resolution to the exception- Returns:
- the resolution url
-
getDocURL
public java.lang.String getDocURL()
Returns the documentation URL associated with the exception.- Returns:
- the documentation URL
-
getDetail
public com.google.gson.JsonArray getDetail()
Returns the error details if available for this exception.- Returns:
- the error details
-
getSuggestedUserMessage
public java.lang.String getSuggestedUserMessage()
Returns the suggested user message if available for this exception.- Returns:
- the suggested user message
-
getRetryAfter
public int getRetryAfter()
Returns the retry-after unix timestamp (ms) upon hitting a rate limit error.- Returns:
- retry-after unix timestamp (ms)
-
-