public function getMessage()
    {
        if ($this->displayErrorDetails() && $this->hasThrown()) {
            return $this->getThrown()->getMessage();
        } else {
            return $this->translator()->translate(
                'The server encountered a problem. Sorry for the temporary inconvenience.',
                [],
                'charcoal'
            );
        }
    }