code: def handle_payload(self, payload):
          
          self.payload = payload
          if CrashReporter.active:
              # Attempt to upload the report
              hq_success = smtp_success = False
              if self._hq is not None:
                  hq_success = self.hq_submit(self.payload)
                  if hq_success:
                      self.payload['HQ Submission'] = 'Sent'
              if self._smtp is not None:
                  # Send the report via email
                  smtp_success = self.smtp_submit(self.subject(), self.body(self.payload), self.attachments())
                  if smtp_success:
                      self.payload['SMTP Submission'] = 'Sent'
  
          if not CrashReporter.active or (self._smtp and not smtp_success) or (self._hq and not hq_success):
              # Only store the offline report if any of the upload methods fail, or if the Crash Reporter was disabled
              report_path = self.store_report(self.payload)
              self.logger.info('Offline Report stored %s' % report_path)
docs: Given a crash report (JSON represented payload), attempts to upload the crash reports. Calls the default
          exception handler (sys.__except_hook__) upon completion.
          :param payload: JSON structure containing crash report along with metadata
          :return: