From eba9bfa49d68b9154259fad5b9fcd68eff89e673 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Fri, 27 Aug 2021 08:41:22 -0400 Subject: [PATCH] Harmonize exception messages --- app/controllers/api/database.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/database.php b/app/controllers/api/database.php index c1798813df..1ea01bc303 100644 --- a/app/controllers/api/database.php +++ b/app/controllers/api/database.php @@ -1308,10 +1308,10 @@ App::patch('/v1/database/collections/:collectionId/documents/:documentId') throw new Exception('Unauthorized permissions', 401); } catch (DuplicateException $exception) { - throw new Exception($exception->getMessage(), 409); + throw new Exception('Document already exists', 409); } catch (StructureException $exception) { - throw new Exception('Bad structure. '.$exception->getMessage(), 400); + throw new Exception($exception->getMessage(), 400); } $audits