Package com.okta.sdk.error
Interface Error
- All Known Implementing Classes:
NonJsonError
,ResourceException
,RetryableException
public interface Error
A detailed error object typically returned with a non 20x response.
- Since:
- 0.5.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns the list of causes of this error.getCode()
Returns the Okta specific error code.Returns the HTTP headers associated with this error response.getId()
Returns the error ID of this error.Returns the detail message string of this error.int
Returns this error's HTTP status code.
-
Method Details
-
getStatus
int getStatus()Returns this error's HTTP status code.- Returns:
- the status code of this Error
-
getCode
String getCode()Returns the Okta specific error code.- Returns:
- an Okta specific error code
-
getMessage
String getMessage()Returns the detail message string of this error.- Returns:
- message string of this error.
-
getId
String getId()Returns the error ID of this error. This maybe used when opening a support case and troubleshooting.- Returns:
- error ID of this error
-
getCauses
List<ErrorCause> getCauses()Returns the list of causes of this error. When validating a resource (for example a User) multiple validation errors could occur.- Returns:
- A list of causes, which could be {code}null{code} or empty
-
getHeaders
Returns the HTTP headers associated with this error response.- Returns:
- A list headers, which could be {code}null{code} or empty
-