Skip to content

Commit

Permalink
return response details in the exception other than response code whe…
Browse files Browse the repository at this point in the history
…n request fails in OAuthHandler
  • Loading branch information
priyanshu-beep committed Apr 25, 2024
1 parent d1f8cd6 commit 998d159
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,12 @@ public void putOAuthCredential(HttpServiceRequest request, HttpServiceResponder
if (response.getResponseCode() != 200) {
throw new OAuthServiceException(
HttpURLConnection.HTTP_INTERNAL_ERROR,
"Request to fetch refresh token returned code " + response.getResponseCode());
"Request for refresh token did not return 200. Response code: "
+ response.getResponseCode()
+ " , response message: "
+ response.getResponseMessage()
+ " , respone body: "
+ response.getResponseBodyAsString());
}

RefreshTokenResponse refreshTokenResponse;
Expand Down

0 comments on commit 998d159

Please sign in to comment.