function noticeError(req, err) {
  const txInfo = getTransactionInfo(this, req)
  if (txInfo && isError(this, err)) {
    assignError(txInfo, err)
  }
}
Tells the shim that the given request has caused an error.

The given error will be checked for truthiness and if it passes the error
predicate check before being held onto.

Use {@link WebFrameworkShim#errorHandled} to unnotice an error if it is later
caught by the user.

@memberof WebFrameworkShim.prototype
@param {Request} req - The request which caused the error.
@param {*?}      err - The error which has occurred.
@see WebFrameworkShim#errorHandled
@see WebFrameworkShim#setErrorPredicate