improve fabric error handling
This commit is contained in:
parent
14e7000677
commit
ef0d33aac4
1 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue