Skip to content

Commit

Permalink
fix: dag get properly errors if the encoder fails
Browse files Browse the repository at this point in the history
  • Loading branch information
aschmahmann committed Aug 17, 2021
1 parent f910871 commit 9339e82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/commands/dag/get.go
Expand Up @@ -63,7 +63,7 @@ func dagGet(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) e
go func() {
defer w.Close()
if err := encoder(finalNode, w); err != nil {
_ = res.CloseWithError(err)
_ = w.CloseWithError(err)
}
}()

Expand Down

0 comments on commit 9339e82

Please sign in to comment.