public class UnauthorizedException extends HttpResponseException
HttpResponseException throw when Contrast API returns a 401 or 403 response.| Constructor and Description |
|---|
UnauthorizedException(int code)
Deprecated.
Used by legacy code for any HTTP 4XX response. Use
UnauthorizedException.UnauthorizedException(String, String, String, int, String) instead. |
UnauthorizedException(java.lang.String message,
java.lang.String method,
java.lang.String path,
int code,
java.lang.String status)
Constructor.
|
UnauthorizedException(java.lang.String message,
java.lang.String method,
java.lang.String path,
int code,
java.lang.String status,
java.lang.String body)
Constructor.
|
fromConnection, getBody, getCode, getMessage, getStatuspublic UnauthorizedException(java.lang.String message,
java.lang.String method,
java.lang.String path,
int code,
java.lang.String status)
message - error message provided by the callercode - code from the status line e.g. 401status - message from the status line e.g. Unauthorizedjava.lang.IllegalArgumentException - when code is not 401 or 403public UnauthorizedException(java.lang.String message,
java.lang.String method,
java.lang.String path,
int code,
java.lang.String status,
java.lang.String body)
message - error message provided by the callercode - code from the status line e.g. 401status - message from the status line e.g. Unauthorizedbody - the body of the response, or null if there is no such bodyjava.lang.IllegalArgumentException - when code is not 401 or 403@Deprecated public UnauthorizedException(int code)
UnauthorizedException.UnauthorizedException(String, String, String, int, String) instead.code - code from the status line e.g. 401Copyright © 2021 Contrast Security, Inc.. All rights reserved.