code: func (t *TerminalHandler) writeError(err error, ws *websocket.Conn) error {
  	// Replace \n with \r\n so the message correctly aligned.
  	r := strings.NewReplacer("\r\n", "\r\n", "\n", "\r\n")
  	errMessage := r.Replace(err.Error())
  	_, err = t.write([]byte(errMessage), ws)
  	if err != nil {
  		return trace.Wrap(err)
  	}
  
  	return nil
  }
docs: // writeError displays an error in the terminal window.