server response message
This commit is contained in:
parent
e960b67cff
commit
3355751bd5
@ -75,7 +75,7 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
|
|||||||
.build();
|
.build();
|
||||||
Response response = client.newCall(request).execute();
|
Response response = client.newCall(request).execute();
|
||||||
if (response.code() > 299) {
|
if (response.code() > 299) {
|
||||||
throw new Error("Server return code " + response.code());
|
throw new Error("Server error:" + response.code() + " " + response.message());
|
||||||
}
|
}
|
||||||
ResponseBody body = response.body();
|
ResponseBody body = response.body();
|
||||||
long contentLength = body.contentLength();
|
long contentLength = body.contentLength();
|
||||||
|
Loading…
Reference in New Issue
Block a user