public function getStatusCode()
    {
        $nestedException = $this->getPrevious();
        if ($nestedException !== null && $nestedException instanceof \Neos\Flow\Exception) {
            return $nestedException->getStatusCode();
        }
        return parent::getStatusCode();
    }