Browse Source

implement not found processing

PHP-GTK3
yggverse 7 months ago
parent
commit
46d27ebfe8
  1. 10
      src/Entity/Tab/Page.php
  2. 3
      src/Page/Nothing.gmi

10
src/Entity/Tab/Page.php

@ -465,6 +465,16 @@ class Page @@ -465,6 +465,16 @@ class Page
}
}
// Process error codes
if (20 != $response->getCode()) // not found
{
$this->_yoda(
'yoda://nothing'
);
return;
} // @TODO other codes
$this->content->set_markup(
\Yggverse\Gemini\Pango::fromGemtext(
$response->getBody()

3
src/Page/Nothing.gmi

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
# Not found
Requested resource not available
Loading…
Cancel
Save