code: func ToQuicError(err error) *QuicError {
  	switch e := err.(type) {
  	case *QuicError:
  		return e
  	case ErrorCode:
  		return Error(e, "")
  	}
  	return Error(InternalError, err.Error())
  }
docs: // ToQuicError converts an arbitrary error to a QuicError. It leaves QuicErrors
  // unchanged, and properly handles `ErrorCode`s.