Class OAuth2ServiceException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- com.sap.cloud.security.xsuaa.client.OAuth2ServiceException
-
- All Implemented Interfaces:
Serializable
public class OAuth2ServiceException extends IOException
Exception thrown to signal issues during communication with OAuth2 server.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOAuth2ServiceException.Builder
-
Constructor Summary
Constructors Constructor Description OAuth2ServiceException(String message)OAuth2ServiceException(String message, Integer httpStatusCode)Creates an exception.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OAuth2ServiceException.Builderbuilder(String message)Creates an exception.IntegergetHttpStatusCode()Returns the HTTP status code of the failed OAuth2 service request or0e.g.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
OAuth2ServiceException
public OAuth2ServiceException(String message)
-
-
Method Detail
-
builder
public static OAuth2ServiceException.Builder builder(String message)
Creates an exception.- Parameters:
message- the error message
-
getHttpStatusCode
public Integer getHttpStatusCode()
Returns the HTTP status code of the failed OAuth2 service request or0e.g. in case the service wasn't called at all.- Returns:
- status code or 0
-
-