From eb0e42b79cb02a9c034a33688f471e5419cfe8e9 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Sun, 9 Nov 2025 12:13:08 +0530 Subject: [PATCH] added error message for the backups route --- app/controllers/shared/api.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 122139d48b..2d32c906bf 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -234,7 +234,9 @@ App::init() ->inject('apiKey') ->action(function (App $utopia, Request $request, Database $dbForPlatform, Database $dbForProject, Audit $queueForAudits, Document $project, Document $user, ?Document $session, array $servers, string $mode, Document $team, ?Key $apiKey) { $route = $utopia->getRoute(); - + if (System::getEnv('_APP_EDITION', 'self-hosted') === 'self-hosted' && str_starts_with($route->getPath(), '/v1/backups')) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Database Backups are available on Appwrite Cloud'); + } if ($project->isEmpty()) { throw new Exception(Exception::PROJECT_NOT_FOUND); }