setError(details) {
    this.hasError = true

    // Error details will be used to create attributes unless the transaction ends
    // with an ignored status code.
    this.errorDetails = details
  }
Set error details to be potentially be used to create span
attributes. Attributes will be created unless the transaction
ends with an ignored error status code.

Last error wins.

@param details