Skip to content

Commit

Permalink
Clean unnecessary log
Browse files Browse the repository at this point in the history
  • Loading branch information
gjeanmart committed Oct 31, 2019
1 parent bf9ba2c commit 2bc4409
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,12 @@ public String write(byte[] content, boolean noPin) {
MerkleNode response = add(file, noPin).get(0);
return response.hash.toString();
} catch (RuntimeException ex) {
log.error("Exception while writing file on IPFS", ex);
if(ex.getMessage().contains("timeout")) { //TODO find something more elegant
throw new TimeoutException("Exception while writing file on IPFS", ex);
} else {
throw ex;
}
} catch (IOException ex) {
log.error("Exception while writing file on IPFS", ex);
throw new TechnicalException("Exception while writing file on IPFS", ex);
}
});
Expand Down Expand Up @@ -243,14 +241,12 @@ public OutputStream read(String id, OutputStream output) {

return output;
} catch (RuntimeException ex) {
log.error("Exception while fetching file from IPFS [id: {}]", id, ex);
if(ex.getMessage().contains("timeout")) { //TODO find something more elegant
throw new TimeoutException("Exception while fetching file from IPFS [id: {}]", ex);
} else {
throw ex;
}
} catch (IOException ex) {
log.error("Exception while fetching file from IPFS [id: {}]", id, ex);
throw new TechnicalException("Exception while fetching file from IPFS " + id, ex);
}
});
Expand Down

0 comments on commit 2bc4409

Please sign in to comment.