1
0
Fork 0
mirror of synced 2024-06-28 11:10:46 +12:00

Debug docs error

This commit is contained in:
eldadfux 2019-10-20 15:08:37 +03:00
parent 39ca8efacc
commit 6f9aa130d8

View file

@ -420,6 +420,7 @@ $utopia->post('/v1/database/:collectionId/documents')
try {
$data = $projectDB->createDocument($data);
} catch (AuthorizationException $exception) {
throw new Exception($exception->getMessage(), 400);
throw new Exception('Unauthorized action', 401);
} catch (StructureException $exception) {
throw new Exception('Bad structure. '.$exception->getMessage(), 400);