more logging

This commit is contained in:
X1nto 2021-02-22 20:00:11 +04:00
parent ac076f5035
commit dced053569
1 changed files with 4 additions and 3 deletions

View File

@ -54,13 +54,14 @@ object DownloadHelper : CoroutineScope by CoroutineScope(Dispatchers.IO) {
} else {
onError("Could not save file")
downloadProgress.postValue(0)
log("VMDownloader", "Failed to save file: $url")
log("VMDownloader", "Failed to save file: $url\n${response.errorBody()}")
}
}
} else {
onError(response.errorBody().toString())
val errorBody = response.errorBody().toString()
onError(errorBody)
downloadProgress.postValue(0)
log("VMDownloader", "Failed to download file: $url")
log("VMDownloader", "Failed to download file: $url\n$errorBody")
}
}