public class AuthServiceException extends AuthClientException
| Modifier and Type | Class and Description |
|---|---|
static class |
AuthServiceException.ErrorType
Indicates who is responsible for a failed request.
|
NL| Constructor and Description |
|---|
AuthServiceException(java.lang.String message)
Constructs a new
AuthServiceException with the specified message. |
AuthServiceException(java.lang.String message,
java.lang.Throwable cause)
Constructs a new
AuthServiceException with the specified message
and exception indicating the root cause. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendExceptionTo(java.lang.Appendable out,
java.lang.Throwable e)
Appends the exception information to appendable object.
|
java.lang.String |
getErrorCode() |
AuthServiceException.ErrorType |
getErrorType() |
java.lang.String |
getRequestId() |
java.lang.String |
getServiceName() |
int |
getStatusCode() |
void |
setErrorCode(java.lang.String errorCode)
Sets the error code represented by this exception.
|
void |
setErrorType(AuthServiceException.ErrorType errorType)
Sets the type of error represented by this exception, indicating if this
exception was the caller's fault, or the service's fault.
|
void |
setRequestId(java.lang.String requestId)
Sets the request identifier for this exception.
|
void |
setServiceName(java.lang.String serviceName)
Sets the name of service that sent this error response.
|
void |
setStatusCode(int statusCode)
Sets the HTTP status code that was returned with this service exception.
|
AuthServiceException |
withErrorCode(java.lang.String errorCode)
Sets the error code represented by this exception and returns
the updated
AuthServiceException object. |
AuthServiceException |
withErrorType(AuthServiceException.ErrorType errorType)
Sets the type of error represented by this exception, indicating if this
exception was the caller's fault, or the service's fault and returns the
updated
AuthServiceException object. |
AuthServiceException |
withRequestId(java.lang.String requestId)
Sets the request identifier for this exception.
|
AuthServiceException |
withServiceName(java.lang.String serviceName)
Sets the name of service that sent this error response and returns
the updated
AuthServiceException object. |
AuthServiceException |
withStatusCode(int statusCode)
Sets the HTTP status code that was returned with this service exception
and returns the updated
AuthServiceException object. |
printStackTrace, printStackTrace, printStackTrace, toStringpublic AuthServiceException(java.lang.String message)
AuthServiceException with the specified message.message - An error message describing what went wrong.public AuthServiceException(java.lang.String message,
java.lang.Throwable cause)
AuthServiceException with the specified message
and exception indicating the root cause.message - An error message describing what went wrong.cause - The root exception that caused this exception to be thrown.public java.lang.String getServiceName()
public void setServiceName(java.lang.String serviceName)
serviceName - the name of service that sent this error response.public AuthServiceException withServiceName(java.lang.String serviceName)
AuthServiceException object.serviceName - the name of service that sent this error response.AuthServiceException object with the new
service name.public java.lang.String getErrorCode()
public void setErrorCode(java.lang.String errorCode)
errorCode - the error code represented by this exception.public AuthServiceException withErrorCode(java.lang.String errorCode)
AuthServiceException object.errorCode - the error code represented by this exception.AuthServiceException object with the new
error code.public int getStatusCode()
public void setStatusCode(int statusCode)
statusCode - the HTTP status code that was returned with this service
exception.public AuthServiceException withStatusCode(int statusCode)
AuthServiceException object.statusCode - the HTTP status code that was returned with this service
exception.AuthServiceException object with the new
status code.public AuthServiceException.ErrorType getErrorType()
public void setErrorType(AuthServiceException.ErrorType errorType)
errorType - The type of error represented by this exception,
indicating if this exception was the caller's fault
or the service's fault.public AuthServiceException withErrorType(AuthServiceException.ErrorType errorType)
AuthServiceException object.errorType - The type of error represented by this exception,
indicating if this exception was the caller's fault
or the service's fault.AuthServiceException object with the new
error type.public java.lang.String getRequestId()
public void setRequestId(java.lang.String requestId)
requestId - The unique identifier for the service request the caller made.public AuthServiceException withRequestId(java.lang.String requestId)
requestId - The unique identifier for the service request the caller made.AuthServiceException object with the new request identifier.protected void appendExceptionTo(java.lang.Appendable out,
java.lang.Throwable e)
throws java.io.IOException
AuthClientExceptionappendExceptionTo in class AuthClientExceptionout - the specified appenable to append exception information to.e - Throwablejava.io.IOException - if