def METHOD_NAME(self, status_code):
    self.logger.debug(f'Update {self}: {status_code}')
    self.status_code = status_code
    self.status_text = str(status_code)
    data = bytes(self.reply.readAll())
    if self.raw_response:
        self.logger.debug('Create a raw response')
        header = self.reply.header(QNetworkRequest.ContentTypeHeader)
        self.on_finished_signal.emit((data, header))
        return
    if not data:
        self.logger.error(f'No data received in the reply for {self}')
        return
    self.logger.debug('Create a json response')
    result = json.loads(data)
    if isinstance(result, dict):
        result[REQUEST_ID] = self.id
    is_error = 'error' in result
    if is_error and self.capture_errors:
        text = self.manager.show_error(self, result)
        raise Warning(text)
    self.on_finished_signal.emit(result)