Skip to content

Commit

Permalink
Builder client - handle exception in request (#9148)
Browse files Browse the repository at this point in the history
* Builder client - handle exception in request

* spotlessly
  • Loading branch information
tbenr authored Feb 19, 2025
1 parent fb9f670 commit 41577e9
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import static java.util.Objects.requireNonNull;

import java.io.IOException;
import java.io.UncheckedIOException;
import java.net.URL;
import java.util.Map;
import java.util.Optional;
Expand Down Expand Up @@ -120,8 +121,12 @@ private <S extends SszData> RequestBody createOctetStreamRequestBody(final S req
return new RequestBody() {

@Override
public void writeTo(final BufferedSink bufferedSink) {
requestBodyObject.sszSerialize(bufferedSink.outputStream());
public void writeTo(final BufferedSink bufferedSink) throws IOException {
try {
requestBodyObject.sszSerialize(bufferedSink.outputStream());
} catch (final UncheckedIOException e) {
throw e.getCause();
}
}

@Override
Expand Down

0 comments on commit 41577e9

Please sign in to comment.