diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3efa09910..104d2fb87 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,9 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
* Fixes a UI error when attempting to change the default Nest and Egg for an existing server.
* Correct permissions check in UI to allow subusers with permission to `view-allocations` the ability to actually see the sidebar link.
+### Changed
+* Panel now throws proper 504: Gateway Timeout errors on server listing when daemon is offline.
+
## v0.7.5 (Derelict Dermodactylus)
### Fixed
* Fixes application API keys being created as a client API key.
diff --git a/app/Http/Controllers/Base/IndexController.php b/app/Http/Controllers/Base/IndexController.php
index 70b5250f0..f5272935f 100644
--- a/app/Http/Controllers/Base/IndexController.php
+++ b/app/Http/Controllers/Base/IndexController.php
@@ -4,6 +4,8 @@ namespace Pterodactyl\Http\Controllers\Base;
use Illuminate\Http\Request;
use Pterodactyl\Models\User;
+use Illuminate\Http\Response;
+use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use Pterodactyl\Http\Controllers\Controller;
use Symfony\Component\HttpKernel\Exception\HttpException;
@@ -81,6 +83,8 @@ class IndexController extends Controller
try {
$response = $this->daemonRepository->setServer($server)->setToken($token)->details();
+ } catch (ConnectException $exception) {
+ throw new HttpException(Response::HTTP_GATEWAY_TIMEOUT, $exception->getMessage());
} catch (RequestException $exception) {
throw new HttpException(500, $exception->getMessage());
}
diff --git a/public/themes/pterodactyl/js/frontend/serverlist.js b/public/themes/pterodactyl/js/frontend/serverlist.js
index 4b1d09197..1c6865a9b 100644
--- a/public/themes/pterodactyl/js/frontend/serverlist.js
+++ b/public/themes/pterodactyl/js/frontend/serverlist.js
@@ -80,8 +80,11 @@
}
}
}).fail(function (jqXHR) {
- console.error(jqXHR);
- element.find('[data-action="status"]').html('Error');
+ if (jqXHR.status === 504) {
+ element.find('[data-action="status"]').html('Gateway Timeout');
+ } else {
+ element.find('[data-action="status"]').html('Error');
+ }
});
}).promise().done(function () {
setTimeout(updateServerStatus, 10000);