From ce5c8d6817c5561dfdd4827c14c97bcaae404cbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 30 Aug 2022 09:28:01 +0200 Subject: [PATCH] Update app/controllers/api/functions.php Co-authored-by: Jake Barnby --- app/controllers/api/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 764de936d..d8fc0a39a 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1341,7 +1341,7 @@ App::post('/v1/functions/:functionId/variables') try { $variable = $dbForProject->createDocument('variables', $variable); } catch (DuplicateException $th) { - throw new Exception(Exception::VARIABLE_ALREADY_EXISTS, 'Variable key already used.'); + throw new Exception(Exception::VARIABLE_ALREADY_EXISTS); } $dbForProject->deleteCachedDocument('functions', $function->getId());