diff --git a/lib/Controller/DaemonConfigController.php b/lib/Controller/DaemonConfigController.php index 6d4f1e8b..7b933ab5 100644 --- a/lib/Controller/DaemonConfigController.php +++ b/lib/Controller/DaemonConfigController.php @@ -142,10 +142,12 @@ public function startTestDeploy(string $name): Response { } $exApp = $this->exAppService->getExApp(Application::TEST_DEPLOY_APPID); - $status = $exApp->getStatus(); + if ($exApp === null) { + return new JSONResponse(['error' => $this->l10n->t('ExApp failed to register, check the NC logs')], Http::STATUS_INTERNAL_SERVER_ERROR); + } return new JSONResponse([ - 'status' => $status, + 'status' => $exApp->getStatus(), ]); } diff --git a/src/components/DaemonConfig/DaemonTestDeploy.vue b/src/components/DaemonConfig/DaemonTestDeploy.vue index d6f8bc0f..8fdf98ba 100644 --- a/src/components/DaemonConfig/DaemonTestDeploy.vue +++ b/src/components/DaemonConfig/DaemonTestDeploy.vue @@ -268,7 +268,10 @@ export default { this.statusChecks.register.passed = true this.statusChecks.register.loading = false } - }).catch(() => { + }).catch((err) => { + if (err.response.data.error) { + showError(err.response.data.error) + } this.stopDeployTest() }).finally(() => { this.startingTest = false @@ -279,13 +282,6 @@ export default { .then(res => { this.startDeployTestPolling() return res - }).catch(err => { - console.debug(err) - if (err.data.error) { - showError(err.data.error) - } - this.clearTestRunning() - return err }).finally(() => { this.getAllDaemons() })