@@ -7,9 +7,9 @@ import java.io.IOException
77
88internal const val UNKNOWN_ERROR_RESPONSE_CODE = 520
99
10- internal fun <S : Any , E : Any > HttpException.extractFromHttpException (
11- errorConverter : Converter <ResponseBody , E >
12- ): NetworkResponse < S , E > {
10+ internal fun <E : Any > HttpException.extractFromHttpException (
11+ errorConverter : Converter <ResponseBody , E >
12+ ): NetworkResponse . ServerError < E > {
1313 val error = response()?.errorBody()
1414 val responseCode = response()?.code() ? : UNKNOWN_ERROR_RESPONSE_CODE
1515 val headers = response()?.headers()
@@ -28,11 +28,11 @@ internal fun <S : Any, E : Any> HttpException.extractFromHttpException(
2828}
2929
3030internal fun <S : Any , E : Any > Throwable.extractNetworkResponse (
31- errorConverter : Converter <ResponseBody , E >
31+ errorConverter : Converter <ResponseBody , E >
3232): NetworkResponse <S , E > {
3333 return when (this ) {
3434 is IOException -> NetworkResponse .NetworkError (this )
35- is HttpException -> extractFromHttpException<S , E >(errorConverter)
35+ is HttpException -> extractFromHttpException<E >(errorConverter)
3636 else -> NetworkResponse .UnknownError (this )
3737 }
3838}
0 commit comments