mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
implement not found processing
This commit is contained in:
parent
26b4095eb8
commit
46d27ebfe8
2 changed files with 13 additions and 0 deletions
|
|
@ -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
Normal file
3
src/Page/Nothing.gmi
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Not found
|
||||
|
||||
Requested resource not available
|
||||
Loading…
Add table
Add a link
Reference in a new issue