1
0
Fork 0
mirror of synced 2024-09-30 09:18:14 +13:00

Harmonize exception messages

This commit is contained in:
kodumbeats 2021-08-27 08:41:22 -04:00
parent cc0c3d074e
commit eba9bfa49d

View file

@ -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