function stringifyReplacer(key, value) {
  // Currently only handle LighthouseError and other Error types.
  if (value instanceof Error) {
    return LighthouseError.stringifyReplacer(value);
  }

  return value;
}
A replacer function for JSON.stingify of the artifacts. Used to serialize objects that
JSON won't normally handle.
@param {string} key
@param {any} value