implement not found processing

This commit is contained in:
yggverse 2024-04-12 09:16:15 +03:00
parent 26b4095eb8
commit 46d27ebfe8
2 changed files with 13 additions and 0 deletions

View file

@ -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( $this->content->set_markup(
\Yggverse\Gemini\Pango::fromGemtext( \Yggverse\Gemini\Pango::fromGemtext(
$response->getBody() $response->getBody()

3
src/Page/Nothing.gmi Normal file
View file

@ -0,0 +1,3 @@
# Not found
Requested resource not available