com.microsoft.bingads.OAuthTokenRequestException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of microsoft.bingads Show documentation
Show all versions of microsoft.bingads Show documentation
The Bing Ads Java SDK is a library improving developer experience when working with the Bing Ads services by providing high-level access to features such as Bulk API, OAuth Authorization and SOAP API.
package com.microsoft.bingads;
/**
* This exception is thrown if an error was returned from the Microsoft Account authorization server.
* To resolve this exception you can first check the stack trace to see the error details, in case there is some action you can take to resolve the issue.
* For example you might have specified an invalid client ID.
*/
public class OAuthTokenRequestException extends RuntimeException {
private final OAuthErrorDetails details;
/**
* Initializes a new instance of the OAuthTokenRequestException with the specified error message and OAuth error details.
*
* @param message the error message returned by the client library
* @param details the details of an error returned from the Microsoft Account authorization server
*/
public OAuthTokenRequestException(String message, OAuthErrorDetails details) {
super(message);
this.details = details;
}
/**
* Gets details of an error returned from the Microsoft Account authorization server.
*/
public OAuthErrorDetails getDetails() {
return details;
}
@Override
public String toString() {
return super.toString() + ". Details: " + details.getError() + " - " + details.getDescription();
}
}