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:
committed by
Tomas Slusny
parent
be98ced0f5
commit
84009901cb
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user