Return the actual error body as a string (#3440)
The previous code returned the text representation of the error body type, which resulted in errors appearing in the UI as: ``` okhttp3.ResponseBody$Companion$asResponseBody$1@... ``` This code actually converts the *body* of the error response to a string, so the error is displayed correctly.
This commit is contained in:
parent
51be2c9374
commit
9ec9d35100
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ class NotificationsPagingSource @Inject constructor(
|
|||
}
|
||||
|
||||
if (!response.isSuccessful) {
|
||||
return LoadResult.Error(Throwable(response.errorBody().toString()))
|
||||
return LoadResult.Error(Throwable(response.errorBody()?.string()))
|
||||
}
|
||||
|
||||
val links = getPageLinks(response.headers()["link"])
|
||||
|
|
Loading…
Reference in a new issue