diff --git a/restapi/index.php b/restapi/index.php index 8f391f6c3..9d744745c 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -1669,7 +1669,7 @@ class RestapiController { /* {{{ */ $doc = $dms->getDocument($args['id']); if($doc && $attrdef) { if($attrdef->getObjType() !== SeedDMS_Core_AttributeDefinition::objtype_document) { - return $response->withJson(array('success'=>false, 'message'=>'Attribute definition not suitable for documents', 'data'=>''), 409); + return $response->withJson(array('success'=>false, 'message'=>'Attribute definition "'.$attrdef->getName().'" not suitable for documents', 'data'=>''), 409); } $params = $request->getParsedBody(); @@ -1726,7 +1726,7 @@ class RestapiController { /* {{{ */ $version = $doc->getContentByVersion($args['version']); if($doc && $attrdef && $version) { if($attrdef->getObjType() !== SeedDMS_Core_AttributeDefinition::objtype_documentcontent) { - return $response->withJson(array('success'=>false, 'message'=>'Attribute definition not suitable for document versions', 'data'=>''), 409); + return $response->withJson(array('success'=>false, 'message'=>'Attribute definition "'.$attrdef->getName().'" not suitable for document versions', 'data'=>''), 409); } $params = $request->getParsedBody(); @@ -1780,7 +1780,7 @@ class RestapiController { /* {{{ */ $obj = $dms->getFolder($args['id']); if($obj && $attrdef) { if($attrdef->getObjType() !== SeedDMS_Core_AttributeDefinition::objtype_folder) { - return $response->withJson(array('success'=>false, 'message'=>'Attribute definition not suitable for folders', 'data'=>''), 409); + return $response->withJson(array('success'=>false, 'message'=>'Attribute definition "'.$attrdef->getName().'" not suitable for folders', 'data'=>''), 409); } $params = $request->getParsedBody();