code: def _make_error(index, code, errmsg, operation):
      
      return {
          _UINDEX: index,
          _UCODE: code,
          _UERRMSG: errmsg,
          _UOP: operation
      }
docs: Create and return an error document.