onRecoverData
Function to convert specific exceptions as data.
Depending on the type of exception that occurred during data retrieval, it is possible to recover it as normal data.
override fun onRecoverData(): QueryRecoverData<QueryChunks<Albums, PageParam>> = { err ->
if (err is ClientRequestException && err.response.status.value == 404) {
emptyList()
} else {
throw err
}
}
Content copied to clipboard