Skip to content

Commit

Permalink
more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dkovacevic committed May 7, 2024
1 parent c3888ea commit 642c8b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend/src/main/java/com/wire/bots/roman/ProviderClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.glassfish.jersey.logging.LoggingFeature;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.UUID;
Expand Down Expand Up @@ -202,8 +203,8 @@ public AssetKey uploadProfilePicture(Cookie cookie, byte[] image, String mimeTyp

if (response.getStatus() >= 400) {
String msg = response.readEntity(String.class);
Logger.warning(msg);
throw new Exception(msg);
Logger.warning("Error uploading asset: %s, status: %d", msg, response.getStatus());
throw new IOException(response.getStatusInfo().getReasonPhrase());
}

return response.readEntity(AssetKey.class);
Expand Down

0 comments on commit 642c8b9

Please sign in to comment.