public class UnauthorizedException extends RuntimeException implements StravaAPIException
Thrown when the Strava API returns an HTTP status of 401 Unauthorised
| Constructor and Description |
|---|
UnauthorizedException(String reason) |
UnauthorizedException(String status,
StravaResponse response,
Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
StravaResponse |
getResponse()
Return the error message emitted by the Strava API
|
void |
setResponse(StravaResponse response) |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic UnauthorizedException(String status, StravaResponse response, Throwable cause)
status - Status messageresponse - the Strava error messagecause - The underlying cause of the exceptionpublic UnauthorizedException(String reason)
reason - The error messagepublic StravaResponse getResponse()
StravaAPIExceptiongetResponse in interface StravaAPIExceptionStravaAPIException.getResponse()public void setResponse(StravaResponse response)
setResponse in interface StravaAPIExceptionresponse - the response to setStravaAPIException.setResponse(javastrava.api.v3.model.StravaResponse)Copyright © 2015 Dan Shannon. All rights reserved.