code: 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);
      }
docs: Create an exception that describes the failure. This method
  calls Authlete's {@code /api/auth/token/fail} API.