code: protected function getExceptionCode()
      {
          if ($this->exception instanceof HttpException) {
              return $this->exception->statusCode;
          }
  
          return $this->exception->getCode();
      }
docs: Gets the code from the [[exception]].
  @return mixed
  @since 2.0.11