Skip to content

Commit

Permalink
Merge pull request #15618 from cdapio/cherrypickCDAP20987
Browse files Browse the repository at this point in the history
[Cherry-pick][CDAP-20987] OAuthHandler should return response details in the exception other than response code when request fails
  • Loading branch information
priyanshu-beep authored Apr 25, 2024
2 parents d1f8cd6 + 998d159 commit 17ca297
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 17ca297

Please sign in to comment.