Skip to content

Commit 4514b1c

Browse files
committed
Adding back erroneous method with deprecated warning
1 parent 6be844d commit 4514b1c

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

ktor-client/ktor-client-core/api/ktor-client-core.api

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ public final class io/ktor/client/plugins/DoubleReceivePluginKt {
301301

302302
public final class io/ktor/client/plugins/HttpCallValidatorConfig {
303303
public fun <init> ()V
304-
public final fun handleResponseException (Lkotlin/jvm/functions/Function3;)V
304+
public final fun handleResponseException (Lkotlin/jvm/functions/Function2;)V
305305
public final fun handleResponseExceptionWithRequest (Lkotlin/jvm/functions/Function3;)V
306306
public final fun validateResponse (Lkotlin/jvm/functions/Function2;)V
307307
}

ktor-client/ktor-client-core/api/ktor-client-core.klib.api

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ final class io.ktor.client.plugins/DefaultRequest { // io.ktor.client.plugins/De
635635
final class io.ktor.client.plugins/HttpCallValidatorConfig { // io.ktor.client.plugins/HttpCallValidatorConfig|null[0]
636636
constructor <init>() // io.ktor.client.plugins/HttpCallValidatorConfig.<init>|<init>(){}[0]
637637

638-
final fun handleResponseException(kotlin.coroutines/SuspendFunction2<kotlin/Throwable, io.ktor.client.request/HttpRequest, kotlin/Unit>) // io.ktor.client.plugins/HttpCallValidatorConfig.handleResponseException|handleResponseException(kotlin.coroutines.SuspendFunction2<kotlin.Throwable,io.ktor.client.request.HttpRequest,kotlin.Unit>){}[0]
638+
final fun handleResponseException(kotlin.coroutines/SuspendFunction1<kotlin/Throwable, kotlin/Unit>) // io.ktor.client.plugins/HttpCallValidatorConfig.handleResponseException|handleResponseException(kotlin.coroutines.SuspendFunction1<kotlin.Throwable,kotlin.Unit>){}[0]
639639
final fun handleResponseExceptionWithRequest(kotlin.coroutines/SuspendFunction2<kotlin/Throwable, io.ktor.client.request/HttpRequest, kotlin/Unit>) // io.ktor.client.plugins/HttpCallValidatorConfig.handleResponseExceptionWithRequest|handleResponseExceptionWithRequest(kotlin.coroutines.SuspendFunction2<kotlin.Throwable,io.ktor.client.request.HttpRequest,kotlin.Unit>){}[0]
640640
final fun validateResponse(kotlin.coroutines/SuspendFunction1<io.ktor.client.statement/HttpResponse, kotlin/Unit>) // io.ktor.client.plugins/HttpCallValidatorConfig.validateResponse|validateResponse(kotlin.coroutines.SuspendFunction1<io.ktor.client.statement.HttpResponse,kotlin.Unit>){}[0]
641641
}

ktor-client/ktor-client-core/common/src/io/ktor/client/plugins/HttpCallValidator.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ public class HttpCallValidatorConfig {
4040
*
4141
* [Report a problem](https://ktor.io/feedback/?fqname=io.ktor.client.plugins.HttpCallValidatorConfig.handleResponseException)
4242
*/
43-
public fun handleResponseException(block: CallRequestExceptionHandler) {
44-
responseExceptionHandlers += RequestExceptionHandlerWrapper(block)
43+
public fun handleResponseException(block: CallExceptionHandler) {
44+
responseExceptionHandlers += ExceptionHandlerWrapper(block)
4545
}
4646

4747
/**

ktor-client/ktor-client-tests/common/test/io/ktor/client/tests/HttpResponseValidatorTest.kt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ class HttpResponseValidatorTest {
3030
addHandler { respondOk() }
3131
}
3232
HttpResponseValidator {
33-
handleResponseException { cause, _ ->
33+
handleResponseException { cause ->
3434
firstHandler++
3535
assertTrue(cause is CallValidatorTestException)
3636
}
3737

38-
handleResponseException { cause, _ ->
38+
handleResponseException { cause ->
3939
secondHandler++
4040
assertTrue(cause is CallValidatorTestException)
4141
}
@@ -46,7 +46,7 @@ class HttpResponseValidatorTest {
4646
assertNotNull(request)
4747
}
4848

49-
handleResponseException { cause, request ->
49+
handleResponseExceptionWithRequest { cause, request ->
5050
fourthHandler++
5151
assertTrue(cause is CallValidatorTestException)
5252
assertNotNull(request)
@@ -79,7 +79,7 @@ class HttpResponseValidatorTest {
7979
addHandler { throw CallValidatorTestException() }
8080
}
8181
HttpResponseValidator {
82-
handleResponseException { cause, _ ->
82+
handleResponseException { cause ->
8383
assertTrue(cause is CallValidatorTestException)
8484
firstHandler++
8585
}
@@ -108,7 +108,7 @@ class HttpResponseValidatorTest {
108108
addHandler { respondOk() }
109109
}
110110
HttpResponseValidator {
111-
handleResponseException { cause, _ ->
111+
handleResponseException { cause ->
112112
assertTrue(cause is CallValidatorTestException)
113113
handleTriggered = true
114114
}
@@ -132,7 +132,7 @@ class HttpResponseValidatorTest {
132132
addHandler { respondOk() }
133133
}
134134
HttpResponseValidator {
135-
handleResponseException { cause, _ ->
135+
handleResponseException { cause ->
136136
assertTrue(cause is CallValidatorTestException)
137137
handleTriggered = true
138138
}
@@ -156,14 +156,14 @@ class HttpResponseValidatorTest {
156156
addHandler { respondOk() }
157157
}
158158
HttpResponseValidator {
159-
handleResponseException { cause, _ ->
159+
handleResponseException { cause ->
160160
firstHandler++
161161
assertTrue(cause is CallValidatorTestException)
162162
}
163163
}
164164

165165
HttpResponseValidator {
166-
handleResponseException { cause, _ ->
166+
handleResponseException { cause ->
167167
secondHandler++
168168
assertTrue(cause is CallValidatorTestException)
169169
}

0 commit comments

Comments
 (0)