This commit is contained in:
Dennis
2024-02-16 14:57:00 +01:00
parent 9535f03ff1
commit a838f1a1da

View File

@@ -68,7 +68,8 @@ class Site extends Resource
string $projectRoot = '/',
string $systemUser = 'ploi',
string $systemUserPassword = null
): stdClass {
): stdClass
{
// Remove the id
$this->setId(null);
@@ -104,6 +105,11 @@ class Site extends Resource
// TODO: Debugging purposes
if (!$response->getJson() || !isset($response->getJson()->data)) {
try {
info(json_encode($response));
} catch (\Throwable $exception) {
}
throw new Exception($response->getJson()->error ?? 'Unknown error has occured');
}