This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ru.kovsharev.porykam.core.utils | |
import com.skydoves.sandwich.ApiResponse | |
import com.skydoves.sandwich.retrofit.serialization.deserializeErrorBody | |
import kotlinx.serialization.SerializationException | |
import kotlinx.serialization.json.Json | |
/** | |
* Deserializes the Json string from error body of the [ApiResponse.Failure.Error] to the [E] custom type. | |
* It returns `null` if the error body is empty or catched exception. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Placeholder to fix gist name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Placeholder to fix gist name |