code: func ErrorWithCauseChain(err error) string {
  	var buffer bytes.Buffer
  
  	for {
  		if wrappedErr, ok := err.(*Err); ok && wrappedErr.Cause != nil {
  			fmt.Fprintln(&buffer, wrappedErr.Error())
  			fmt.Fprint(&buffer, "caused by ")
  			err = wrappedErr.Cause
  		} else {
  			break
  		}
  	}
  
  	if err != nil {
  		buffer.WriteString(err.Error())
  	} else {
  		buffer.WriteString("<err=nil>")
  	}
  
  	return buffer.String()
  }
docs: /*
  ErrorWithCauseChain formats err and all its causes if it's an *Err, else returns
  err.Error().
  */