improve fabric error handling

This commit is contained in:
1e99 2024-12-16 18:10:03 +01:00
parent 14e7000677
commit ef0d33aac4

View file

@ -99,7 +99,8 @@ public class ImageUploads {
HttpResponse.BodyHandlers.ofString()
);
if (res.statusCode() != 201) {
throw new RuntimeException(String.format("Failed to upload, expected status 201, got %d", res.statusCode()));
String body = res.body();
throw new RuntimeException(String.format("Failed to upload, expected status 201, got %d, body: %s", res.statusCode(), body));
}
String id = res.body();