Skip to content

Commit

Permalink
Merge remote-tracking branch 'obsidian/add-body-to-network-errors' in…
Browse files Browse the repository at this point in the history
…to ipfs-binary-cache-develop
  • Loading branch information
Ericson2314 committed Jun 22, 2020
2 parents 13512c1 + 1b23fe4 commit 31f6ca8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libstore/filetransfer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ struct curlFileTransfer : public FileTransfer

std::shared_ptr<std::string> response;
if (decompressionSink)
if (auto teeSink = std::dynamic_pointer_cast<TeeSink<std::shared_ptr<CompressionSink>>>(decompressionSink))
if (auto teeSink = std::dynamic_pointer_cast<TeeSink<ref<CompressionSink>>>(decompressionSink))
response = teeSink->data;
auto exc =
code == CURLE_ABORTED_BY_CALLBACK && _isInterrupted
Expand Down Expand Up @@ -877,7 +877,7 @@ FileTransferError::FileTransferError(FileTransfer::Error error, std::shared_ptr<
{
const auto hf = hintfmt(args...);
if (response) {
err.hint = hintfmt("%1%\n\nresponse body:\n\n%2%", normaltxt(hf.str()), response);
err.hint = hintfmt("%1%\n\nresponse body:\n\n%2%", normaltxt(hf.str()), *response);
} else {
err.hint = hf;
}
Expand Down

0 comments on commit 31f6ca8

Please sign in to comment.