diff --git a/src/Spryker/Glue/AppKernel/Controller/AppDisconnectController.php b/src/Spryker/Glue/AppKernel/Controller/AppDisconnectController.php index c2f5c93..65a8bd6 100644 --- a/src/Spryker/Glue/AppKernel/Controller/AppDisconnectController.php +++ b/src/Spryker/Glue/AppKernel/Controller/AppDisconnectController.php @@ -54,7 +54,7 @@ public function postDisconnectAction(GlueRequestTransfer $glueRequestTransfer): if (!$appConfigResponseTransfer->getIsSuccessful()) { return $this->getFactory() ->createResponseBuilder() - ->buildErrorResponse(AppKernelConfig::RESPONSE_MESSAGE_DISCONNECT_ERROR); + ->buildErrorResponse($appConfigResponseTransfer->getErrorMessage() ?? AppKernelConfig::RESPONSE_MESSAGE_DISCONNECT_ERROR); } return $this->getFactory()->createResponseBuilder()->buildSuccessfulResponse(); diff --git a/src/Spryker/Zed/AppKernel/Business/Writer/ConfigWriter.php b/src/Spryker/Zed/AppKernel/Business/Writer/ConfigWriter.php index 6c1e263..342de2d 100644 --- a/src/Spryker/Zed/AppKernel/Business/Writer/ConfigWriter.php +++ b/src/Spryker/Zed/AppKernel/Business/Writer/ConfigWriter.php @@ -29,7 +29,7 @@ class ConfigWriter implements ConfigWriterInterface /** * @var string */ - protected const FAILED_TO_REGISTER_TENANT_MESSAGE = 'Tenant registration failed'; + protected const TENANT_ACTION_FAILED_MESSAGE = 'Tenant action failed'; /** * @param array<\Spryker\Zed\AppKernelExtension\Dependency\Plugin\ConfigurationBeforeSavePluginInterface> $configurationBeforeSavePlugins @@ -59,14 +59,14 @@ public function saveConfig(AppConfigTransfer $appConfigTransfer): AppConfigRespo return $this->getSuccessResponse($appConfigTransfer); } catch (Throwable $throwable) { $this->getLogger()->error( - static::FAILED_TO_REGISTER_TENANT_MESSAGE, + static::TENANT_ACTION_FAILED_MESSAGE, [ 'tenantIdentifier' => $appConfigTransfer->getTenantIdentifier(), 'exception' => $throwable, ], ); - return $this->getFailResponse(sprintf('%s: %s', static::FAILED_TO_REGISTER_TENANT_MESSAGE, $throwable->getMessage())); + return $this->getFailResponse(sprintf('%s: %s', static::TENANT_ACTION_FAILED_MESSAGE, $throwable->getMessage())); } } diff --git a/tests/SprykerTest/Glue/AppKernel/_support/Helper/AppKernelAssertionHelper.php b/tests/SprykerTest/Glue/AppKernel/_support/Helper/AppKernelAssertionHelper.php index 97717e8..60fd609 100644 --- a/tests/SprykerTest/Glue/AppKernel/_support/Helper/AppKernelAssertionHelper.php +++ b/tests/SprykerTest/Glue/AppKernel/_support/Helper/AppKernelAssertionHelper.php @@ -85,7 +85,7 @@ public function assertGlueResponseContainsErrorMessageWhenExceptionWasThrown(Glu $this->assertNotEmpty($contentData); $this->assertEquals(1, count($contentData['errors'])); $this->assertEquals( - 'Tenant registration failed: Something went wrong', + 'Tenant action failed: Something went wrong', $contentData['errors'][0]['message'], ); }