Skip to content

Commit

Permalink
enh: update error message
Browse files Browse the repository at this point in the history
Signed-off-by: Valery Piashchynski <[email protected]>
  • Loading branch information
rustatian committed Jul 1, 2022
1 parent 1b090b8 commit ba1a361
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/receive.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ func ReceiveFrame(relay io.Reader, fr *frame.Frame) error {
if d, ok := relay.(deadliner); ok {
err = d.SetReadDeadline(time.Now().Add(time.Second * 2))
if err != nil {
return errors.E(op, errors.Errorf("validation failed on the message sent to STDOUT: see: https://bit.ly/3a8iQTQ, invalid message: %s", fr.Header()))
return errors.E(op, errors.Errorf("validation failed on the message sent to STDOUT, RR docs: https://bit.ly/3a8iQTQ, invalid message: %s", fr.Header()))
}

// we don't care about error here
resp, _ := io.ReadAll(relay)

return errors.E(op, errors.Errorf("validation failed on the message sent to STDOUT: see: https://bit.ly/3a8iQTQ, invalid message: %s", string(fr.Header())+string(resp)))
return errors.E(op, errors.Errorf("validation failed on the message sent to STDOUT, RR docs: https://bit.ly/3a8iQTQ, invalid message: %s", string(fr.Header())+string(resp)))
}

// no deadline, so, only 14 bytes
return errors.E(op, errors.Errorf("validation failed on the message sent to STDOUT: see: https://bit.ly/3a8iQTQ, invalid message: %s", fr.Header()))
return errors.E(op, errors.Errorf("validation failed on the message sent to STDOUT, RR docs: https://bit.ly/3a8iQTQ, invalid message: %s", fr.Header()))
}

// read the read payload
Expand Down

0 comments on commit ba1a361

Please sign in to comment.