{"record":{"id":"83a475c89820f428","repo":"coollabsio/coolify","slug":"an-application-with-this-name-already-exists","errorCode":null,"errorMessage":"An application with this name already exists.","messagePattern":"An application with this name already exists\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"app/Livewire/Project/Service/Index.php","lineNumber":257,"sourceCode":"                return;\n            }\n            $this->submitDatabase();\n            $this->dispatch('success', 'You need to restart the service for the changes to take effect.');\n        } catch (\\Throwable $e) {\n            return handleError($e, $this);\n        }\n    }\n\n    public function convertToApplication()\n    {\n        try {\n            $this->authorize('update', $this->serviceDatabase);\n            $service = $this->serviceDatabase->service;\n            $serviceDatabase = $this->serviceDatabase;\n\n            // Check if application with same name already exists\n            if ($service->applications()->where('name', $serviceDatabase->name)->exists()) {\n                throw new \\Exception('An application with this name already exists.');\n            }\n\n            // Create new parameters removing database_uuid\n            $redirectParams = collect($this->parameters)\n                ->except('database_uuid')\n                ->all();\n\n            DB::transaction(function () use ($service, $serviceDatabase) {\n                $service->applications()->create([\n                    'name' => $serviceDatabase->name,\n                    'human_name' => $serviceDatabase->human_name,\n                    'description' => $serviceDatabase->description,\n                    'exclude_from_status' => $serviceDatabase->exclude_from_status,\n                    'is_log_drain_enabled' => $serviceDatabase->is_log_drain_enabled,\n                    'image' => $serviceDatabase->image,\n                    'service_id' => $service->id,\n                    'is_migrated' => true,\n                ]);","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/coollabsio/coolify/blob/70b9acc42467278373e00de77abb40684e25b395/app/Livewire/Project/Service/Index.php#L239-L275","documentation":"Error \"An application with this name already exists.\" thrown in coollabsio/coolify.","triggerScenarios":"Thrown at app/Livewire/Project/Service/Index.php:257 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"70b9acc42467278373e00de77abb40684e25b395","analyzedAt":"2026-08-17T01:41:01.313Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}