src/main/java/com/authlete/jaxrs/AuthleteApiCaller.java
public WebApplicationException tokenFail(String ticket, TokenFailRequest.Reason reason)
    {
        // Create a response to the client application with the help of
        // Authlete's /api/auth/token/fail API.
        Response response = createTokenFailResponse(ticket, reason);

        // Create an exception containing the response.
        return new WebApplicationException(response);
    }
public WebApplicationException tokenFail(String ticket, TokenFailRequest.Reason reason)
    {
        // Create a response to the client application with the help of
        // Authlete's /api/auth/token/fail API.
        Response response = createTokenFailResponse(ticket, reason);

        // Create an exception containing the response.
        return new WebApplicationException(response);
    }
Create an exception that describes the failure. This method
calls Authlete's {@code /api/auth/token/fail} API.