code: def retain_error(self, error, frame=None):
          
          if frame is None:
              stack = traceback.format_exc()
              self.labels.add("@iopipe/error")
          else:
              stack = "\n".join(traceback.format_stack(frame))
              self.labels.add("@iopipe/timeout")
          details = {
              "name": type(error).__name__,
              "message": "{}".format(error),
              "stack": stack,
          }
          self.report["errors"] = details
docs: Adds details of an error to the report.
  
          :param error: The error exception to add to the report.