class RCError(Exception):
  def __init__(
    self,
    message: str | None = None,
    rc: int = 0,
    msg_args: dict | None = None,
    status_code: int = 200,
    result=None,
  ):
    self.message = message
    self.rc = rc
    self.msg_args = msg_args
    self.result = result
    self.status_code = status_code
    super().__init__(message)

  def __repr__(self):
    return '{}<{}> message: {}; msg_args: {}; result: {}'.format(
      self.__class__.__name__,
      self.rc,
      self.message,
      self.msg_args,
      self.result,
    )

  __str__ = __repr__
