Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public interface OAuth2Client
/**
* The REST version targeted by JDA-Utilities OAuth2.
*/
int DISCORD_REST_VERSION = 6;
int DISCORD_REST_VERSION = 8;

/**
* Generates a formatted authorization URL from the provided redirect URI fragment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public abstract class OAuth2Action<T>
{
protected static final Consumer DEFAULT_SUCCESS = t -> {};
protected static final Consumer<Throwable> DEFAULT_FAILURE = t -> {
OAuth2Requester.LOGGER.error("Requester encountered an error while processing response!");
OAuth2Requester.LOGGER.error("Requester encountered an error while processing response!", t);
};

protected final OAuth2ClientImpl client;
Expand Down Expand Up @@ -86,6 +86,7 @@ protected Request buildRequest()
}

builder.url(url);
builder.header("User-Agent", OAuth2Requester.USER_AGENT);
builder.headers(getHeaders());

return builder.build();
Expand Down