Skip to content

Commit

Permalink
Update apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api…
Browse files Browse the repository at this point in the history
…/DefaultUpload.kt

Co-authored-by: Martin Bonnin <[email protected]>
  • Loading branch information
BoD and martinbonnin authored May 23, 2022
1 parent f8fa368 commit 97477dd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DefaultUpload internal constructor(

override fun writeTo(sink: BufferedSink) {
if (bufferedSource != null) {
check(!bufferedSourceConsumed) { "Upload.writeTo must be called only once" }
check(!bufferedSourceConsumed) { "Apollo: DefaultUpload body can only be read once. If you want to read it several times for logging or other purposes, either buffer it in memory or use your own `Upload` implementation." }
bufferedSource.use {
sink.writeAll(it)
}
Expand Down

0 comments on commit 97477dd

Please sign in to comment.