Log whole HTTP response instead of just message (#8126)

Response message is usually either empty or not useful.

Closes #8042
This commit is contained in:
Nathaniel Ngo
2019-03-18 20:58:46 -04:00
committed by Tomas Slusny
parent be98ced0f5
commit 84009901cb
10 changed files with 18 additions and 18 deletions

View File

@@ -63,7 +63,7 @@ public class BlogService
{
if (!response.isSuccessful())
{
throw new IOException("Error getting blog posts: " + response.message());
throw new IOException("Error getting blog posts: " + response);
}
try

View File

@@ -63,7 +63,7 @@ public class OSRSNewsService
{
if (!response.isSuccessful())
{
throw new IOException("Error getting OSRS news: " + response.message());
throw new IOException("Error getting OSRS news: " + response);
}
try

View File

@@ -103,9 +103,9 @@ public class TwitterService
{
return getTweets(true);
}
throw new InternalServerErrorException("Could not auth to Twitter after trying once: " + response.message());
throw new InternalServerErrorException("Could not auth to Twitter after trying once: " + response);
default:
throw new IOException("Error getting Twitter list: " + response.message());
throw new IOException("Error getting Twitter list: " + response);
}
}
@@ -146,7 +146,7 @@ public class TwitterService
{
if (!response.isSuccessful())
{
throw new IOException("Error authing to Twitter: " + response.message());
throw new IOException("Error authing to Twitter: " + response);
}
InputStream in = response.body().byteStream();

View File

@@ -377,7 +377,7 @@ public class ItemService
{
if (!response.isSuccessful())
{
throw new IOException("Unsuccessful http response: " + response.message());
throw new IOException("Unsuccessful http response: " + response);
}
InputStream in = response.body().byteStream();
@@ -401,7 +401,7 @@ public class ItemService
{
if (!response.isSuccessful())
{
throw new IOException("Unsuccessful http response: " + response.message());
throw new IOException("Unsuccessful http response: " + response);
}
return response.body().bytes();