diff --git a/resources/js/views/SetupWizard/EnvironmentSetup.vue b/resources/js/views/SetupWizard/EnvironmentSetup.vue index 4b4799d6..0df091d0 100644 --- a/resources/js/views/SetupWizard/EnvironmentSetup.vue +++ b/resources/js/views/SetupWizard/EnvironmentSetup.vue @@ -147,6 +147,10 @@ + +

Something went wrong, please try it again.

+
+ @@ -211,6 +215,7 @@ export default { }, data() { return { + isError: false, isLoading: false, ossRegions: [ { @@ -510,6 +515,7 @@ export default { async EnvironmentSetupSubmit() { if (this.$root.$data.config.isSetupWizardDemo) { this.$router.push({name: 'AppSetup'}) + return } // Validate fields @@ -540,6 +546,10 @@ export default { .catch((error) => { // End loading this.isLoading = false + + if (error.response.status === 500) { + this.isError = true + } }) }, }, diff --git a/src/Domain/SetupWizard/Controllers/StoreEnvironmentSettingsController.php b/src/Domain/SetupWizard/Controllers/StoreEnvironmentSettingsController.php index 32e9faef..e43517e7 100644 --- a/src/Domain/SetupWizard/Controllers/StoreEnvironmentSettingsController.php +++ b/src/Domain/SetupWizard/Controllers/StoreEnvironmentSettingsController.php @@ -14,8 +14,7 @@ class StoreEnvironmentSettingsController extends Controller */ public function __invoke( StoreEnvironmentSetupRequest $request, - ): Response - { + ): Response { if (!app()->runningUnitTests()) { $drivers = [ 'local' => [ @@ -71,9 +70,9 @@ class StoreEnvironmentSettingsController extends Controller ]; // Store credentials for mail - setEnvironmentValue([ - $mail[$request->input('mail.driver')] - ]); + setEnvironmentValue( + $mail[$request->input('mailDriver')] + ); Artisan::call('config:cache'); }