Skip to content

Commit

Permalink
feat(platform): refer to platform status in error pages
Browse files Browse the repository at this point in the history
  • Loading branch information
m90 committed Jun 11, 2024
1 parent 442e33c commit b09ac27
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions dist-persist/wbstack/src/Shim/Web.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
\WBStack\Info\GlobalSet::forDomain($_SERVER['SERVER_NAME']);
} catch (\WBStack\Info\GlobalSetException $ex) {
http_response_code($ex->getCode());
echo "You have requested the domain: " . $_SERVER['SERVER_NAME'] . ". But that wiki can not currently be loaded.".PHP_EOL;
echo "You have requested the domain: " . $_SERVER['SERVER_NAME'] . ". But that wiki can not currently be loaded.<br/>";
if ($ex->getCode() === 404) {
echo "It may never have existed or it might now be deleted.".PHP_EOL;
echo "It may never have existed or it might now be deleted.<br/>";
} else {
echo "There was a server error in the platform API.".PHP_EOL;
echo "There was a server error in the platform API<br/>.";
}
echo $ex->getMessage();
echo $ex->getMessage()."<br/>";
echo "You can check the platform status at <a href=\"https://status.wikibase.cloud\">status.wikibase.cloud</a><br/>.";
die(1);
}

Expand Down
9 changes: 5 additions & 4 deletions dist/wbstack/src/Shim/Web.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
\WBStack\Info\GlobalSet::forDomain($_SERVER['SERVER_NAME']);
} catch (\WBStack\Info\GlobalSetException $ex) {
http_response_code($ex->getCode());
echo "You have requested the domain: " . $_SERVER['SERVER_NAME'] . ". But that wiki can not currently be loaded.".PHP_EOL;
echo "You have requested the domain: " . $_SERVER['SERVER_NAME'] . ". But that wiki can not currently be loaded.<br/>";
if ($ex->getCode() === 404) {
echo "It may never have existed or it might now be deleted.".PHP_EOL;
echo "It may never have existed or it might now be deleted.<br/>";
} else {
echo "There was a server error in the platform API.".PHP_EOL;
echo "There was a server error in the platform API<br/>.";
}
echo $ex->getMessage();
echo $ex->getMessage()."<br/>";
echo "You can check the platform status at <a href=\"https://status.wikibase.cloud\">status.wikibase.cloud</a><br/>.";
die(1);
}

Expand Down

0 comments on commit b09ac27

Please sign in to comment.