code: func getStacktrace(err error) errors.StackTrace {
  	var stack errors.StackTrace
  	for err != nil {
  		errWithStack, stackOK := err.(stackTracer)
  		if stackOK && errWithStack.StackTrace() != nil {
  			stack = errWithStack.StackTrace()
  		}
  		if errWithCause, causerOK := err.(causer); causerOK {
  			err = errWithCause.Cause()
  		} else {
  			// end of chain
  			break
  		}
  	}
  	return stack
  }
docs: // There are two interfaces that drive this implementation:
  //
  //   * causer
  //     - it unwraps an error instance in a chain of errors created with errors.Wrap
  //     - therefore, the last one in the chain is the root cause (inner-most)
  //
  //   * stackTracer
  //     - not all errors in the aforementioned chain may have a stack trace,
  //
  // It returns the innermost stack trace in a chain of errors because it is
  // the closest to the root cause.
  //