You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: keep HTTP error bodies readable and forward the value slot
ThrowOnHttpErrorStep built the exception from the live response, but the
pipeline closes that response (and its body) as soon as the step throws,
so the error body was unreadable on the resulting Failure — contradicting
the bodySnapshot and stream-on-demand contract. Buffer the error body
into a bounded, replayable in-memory body before constructing the
exception, capped at HttpException.DEFAULT_SNAPSHOT_BYTES so a large 5xx
body cannot exhaust memory. Add a test that the failure's body and
bodySnapshot are still readable after the pipeline closes the original.
Forward the value slot through the concrete HttpException subclasses so a
codegen subclass derived from a concrete type (as the base KDoc
describes) can stamp a typed payload; previously only the abstract base
accepted it.
Single-source the 400..599 error boundary by adding isErrorStatus and
fromResponseOrNull to HttpExceptionFactory and having the step use them,
instead of redeclaring the range. Tighten the value round-trip test to
assertSame, reword a test comment off tracker IDs, and soften the docs so
they describe ThrowOnHttpErrorStep as a building block rather than
implying a default pipeline wires it. Regenerate the API snapshot.
Copy file name to clipboardExpand all lines: sdk-core/api/sdk-core.api
+38-18Lines changed: 38 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -1264,49 +1264,56 @@ public class org/dexpace/sdk/core/http/response/exception/BadGatewayException :
1264
1264
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;)V
1265
1265
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;)V
1266
1266
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;)V
1267
-
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1267
+
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
1268
+
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1268
1269
}
1269
1270
1270
1271
public class org/dexpace/sdk/core/http/response/exception/BadRequestException : org/dexpace/sdk/core/http/response/exception/HttpException {
1271
1272
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;)V
1272
1273
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;)V
1273
1274
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;)V
1274
-
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1275
+
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
1276
+
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1275
1277
}
1276
1278
1277
1279
public class org/dexpace/sdk/core/http/response/exception/ClientErrorException : org/dexpace/sdk/core/http/response/exception/HttpException {
1278
1280
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;)V
1279
1281
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;)V
1280
1282
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;)V
1281
-
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1283
+
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
1284
+
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1282
1285
}
1283
1286
1284
1287
public class org/dexpace/sdk/core/http/response/exception/ConflictException : org/dexpace/sdk/core/http/response/exception/HttpException {
1285
1288
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;)V
1286
1289
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;)V
1287
1290
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;)V
1288
-
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1291
+
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
1292
+
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1289
1293
}
1290
1294
1291
1295
public class org/dexpace/sdk/core/http/response/exception/ForbiddenException : org/dexpace/sdk/core/http/response/exception/HttpException {
1292
1296
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;)V
1293
1297
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;)V
1294
1298
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;)V
1295
-
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1299
+
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
1300
+
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1296
1301
}
1297
1302
1298
1303
public class org/dexpace/sdk/core/http/response/exception/GatewayTimeoutException : org/dexpace/sdk/core/http/response/exception/HttpException {
1299
1304
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;)V
1300
1305
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;)V
1301
1306
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;)V
1302
-
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1307
+
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
1308
+
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1303
1309
}
1304
1310
1305
1311
public class org/dexpace/sdk/core/http/response/exception/GoneException : org/dexpace/sdk/core/http/response/exception/HttpException {
1306
1312
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;)V
1307
1313
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;)V
1308
1314
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;)V
1309
-
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1315
+
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
1316
+
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1310
1317
}
1311
1318
1312
1319
public abstract class org/dexpace/sdk/core/http/response/exception/HttpException : java/lang/RuntimeException, org/dexpace/sdk/core/http/response/exception/Retryable {
@@ -1333,20 +1340,24 @@ public final class org/dexpace/sdk/core/http/response/exception/HttpException$Co
1333
1340
public final class org/dexpace/sdk/core/http/response/exception/HttpExceptionFactory {
1334
1341
public static final field INSTANCE Lorg/dexpace/sdk/core/http/response/exception/HttpExceptionFactory;
1335
1342
public static final fun fromResponse (Lorg/dexpace/sdk/core/http/response/Response;)Lorg/dexpace/sdk/core/http/response/exception/HttpException;
1343
+
public static final fun fromResponseOrNull (Lorg/dexpace/sdk/core/http/response/Response;)Lorg/dexpace/sdk/core/http/response/exception/HttpException;
1344
+
public static final fun isErrorStatus (I)Z
1336
1345
}
1337
1346
1338
1347
public class org/dexpace/sdk/core/http/response/exception/InternalServerErrorException : org/dexpace/sdk/core/http/response/exception/HttpException {
1339
1348
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;)V
1340
1349
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;)V
1341
1350
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;)V
1342
-
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1351
+
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
1352
+
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1343
1353
}
1344
1354
1345
1355
public class org/dexpace/sdk/core/http/response/exception/MethodNotAllowedException : org/dexpace/sdk/core/http/response/exception/HttpException {
1346
1356
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;)V
1347
1357
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;)V
1348
1358
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;)V
1349
-
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1359
+
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
1360
+
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1350
1361
}
1351
1362
1352
1363
public class org/dexpace/sdk/core/http/response/exception/NetworkException : java/io/IOException, org/dexpace/sdk/core/http/response/exception/Retryable {
@@ -1361,21 +1372,24 @@ public class org/dexpace/sdk/core/http/response/exception/NotFoundException : or
1361
1372
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;)V
1362
1373
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;)V
1363
1374
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;)V
1364
-
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1375
+
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
1376
+
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1365
1377
}
1366
1378
1367
1379
public class org/dexpace/sdk/core/http/response/exception/PayloadTooLargeException : org/dexpace/sdk/core/http/response/exception/HttpException {
1368
1380
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;)V
1369
1381
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;)V
1370
1382
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;)V
1371
-
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1383
+
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
1384
+
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1372
1385
}
1373
1386
1374
1387
public class org/dexpace/sdk/core/http/response/exception/RequestTimeoutException : org/dexpace/sdk/core/http/response/exception/HttpException {
1375
1388
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;)V
1376
1389
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;)V
1377
1390
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;)V
1378
-
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1391
+
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
1392
+
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1379
1393
}
1380
1394
1381
1395
public abstract interface class org/dexpace/sdk/core/http/response/exception/Retryable {
@@ -1386,42 +1400,48 @@ public class org/dexpace/sdk/core/http/response/exception/ServerErrorException :
1386
1400
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;)V
1387
1401
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;)V
1388
1402
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;)V
1389
-
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1403
+
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
1404
+
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1390
1405
}
1391
1406
1392
1407
public class org/dexpace/sdk/core/http/response/exception/ServiceUnavailableException : org/dexpace/sdk/core/http/response/exception/HttpException {
1393
1408
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;)V
1394
1409
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;)V
1395
1410
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;)V
1396
-
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1411
+
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
1412
+
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1397
1413
}
1398
1414
1399
1415
public class org/dexpace/sdk/core/http/response/exception/TooManyRequestsException : org/dexpace/sdk/core/http/response/exception/HttpException {
1400
1416
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;)V
1401
1417
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;)V
1402
1418
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;)V
1403
-
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1419
+
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
1420
+
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1404
1421
}
1405
1422
1406
1423
public class org/dexpace/sdk/core/http/response/exception/UnauthorizedException : org/dexpace/sdk/core/http/response/exception/HttpException {
1407
1424
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;)V
1408
1425
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;)V
1409
1426
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;)V
1410
-
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1427
+
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
1428
+
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1411
1429
}
1412
1430
1413
1431
public class org/dexpace/sdk/core/http/response/exception/UnprocessableEntityException : org/dexpace/sdk/core/http/response/exception/HttpException {
1414
1432
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;)V
1415
1433
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;)V
1416
1434
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;)V
1417
-
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1435
+
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
1436
+
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1418
1437
}
1419
1438
1420
1439
public class org/dexpace/sdk/core/http/response/exception/UnsupportedMediaTypeException : org/dexpace/sdk/core/http/response/exception/HttpException {
1421
1440
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;)V
1422
1441
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;)V
1423
1442
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;)V
1424
-
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1443
+
public fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;)V
1444
+
public synthetic fun <init> (Lorg/dexpace/sdk/core/http/response/Response;Ljava/lang/String;Ljava/lang/Throwable;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1425
1445
}
1426
1446
1427
1447
public final class org/dexpace/sdk/core/http/sse/ServerSentEvent {
0 commit comments