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());