error.go
func (e Error) Write(w *bufio.Writer) (err error) {
	if err = writeFrameHeader(w, FrameTypeError, len(e)); err != nil {
		err = errors.WithMessage(err, "writing error message")
		return
	}

	if _, err = w.WriteString(string(e)); err != nil {
		err = errors.Wrap(err, "writing error message")
		return
	}

	return
}
func (e Error) Write(w *bufio.Writer) (err error) {
	if err = writeFrameHeader(w, FrameTypeError, len(e)); err != nil {
		err = errors.WithMessage(err, "writing error message")
		return
	}

	if _, err = w.WriteString(string(e)); err != nil {
		err = errors.Wrap(err, "writing error message")
		return
	}

	return
}
// Write serializes the frame to the given buffered output, satisfies the Frame
// interface.