Skip to content

Commit cdcf589

Browse files
dtretyakovchingor13
authored andcommitted
Show error message in case of problems with getting access token (#206)
Currently it's unclear what caused the problem with it
1 parent eb7e845 commit cdcf589

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oauth2_http/java/com/google/auth/oauth2/ServiceAccountCredentials.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ public boolean isRequired(HttpResponse response) {
398398
try {
399399
response = request.execute();
400400
} catch (IOException e) {
401-
throw new IOException("Error getting access token for service account: ", e);
401+
throw new IOException(String.format("Error getting access token for service account: %s", e.getMessage()), e);
402402
}
403403

404404
GenericData responseData = response.parseAs(GenericData.class);

0 commit comments

Comments
 (0)