deserializeHttpError

inline fun <T> Throwable.deserializeHttpError(json: Json = Json): T?

Author

skydoves (Jaewoong Eum)

Since

1.0.1

Deserializes the Json string from error body of the HttpException to the T custom type. The Json instance could be configured as needed. It returns null if the exception is not HttpException or error body is empty.