public function getStatusCode(FlattenException $exception)
    {
        $str = '';
        if (method_exists($exception, 'getStatusCode') == true) {
            $str = $exception->getStatusCode();
        } elseif (method_exists($exception, 'getCode') == true) {
         $str = $exception->getCode();
        }

        return $str;
    }