Skip to content

Commit

Permalink
ignore w.Write error as not much can be done now
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Nov 9, 2022
1 parent be7cf70 commit 0a54117
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/corehttp/gateway_handler_tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (i *gatewayHandler) serveTAR(ctx context.Context, w http.ResponseWriter, r
// The TAR has a top-level directory (or file) named by the CID.
if err := tarw.WriteFile(file, resolvedPath.Cid().String()); err != nil {
w.Header().Set("X-Stream-Error", err.Error())
w.Write([]byte(err.Error()))
_, _ = w.Write([]byte(err.Error()))
return
}
}

0 comments on commit 0a54117

Please sign in to comment.