When adding a tag through the org.nuxeo.ecm.platform.tag.operations.TagDocument operation to a doc not supporting tagging. You receive a meaningless 500 error.
While debugging I figured out the exception
17:03:26,958 WARN [ReconnectedEventBundleImpl] Listener 'notificationListener' cannot refetch missing document: 11cefb22-6991-4dc5-8f54-eb19c9dd8937 (/default-domain/Nuxeo_Workspace/Test_Folder) java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor1258.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:173) at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:178) at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$OperationMethod.invoke(OperationChainCompiler.java:128) at org.nuxeo.ecm.automation.core.impl.OperationChainCompiler$CompiledChainImpl.invoke(OperationChainCompiler.java:196) at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:120) at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:107) at org.nuxeo.ecm.automation.server.jaxrs.OperationResource.execute(OperationResource.java:58) at org.nuxeo.ecm.automation.server.jaxrs.ExecutableResource.doPost(ExecutableResource.java:70) ... Caused by: java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:148) at java.util.AbstractList.add(AbstractList.java:108) at org.nuxeo.ecm.platform.tag.FacetedTagService.doTag(FacetedTagService.java:77) at org.nuxeo.ecm.platform.tag.AbstractTagService.lambda$tag$0(AbstractTagService.java:103) at org.nuxeo.ecm.core.api.CoreInstance$4.run(CoreInstance.java:327) at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:117) at org.nuxeo.ecm.core.api.CoreInstance.doPrivileged(CoreInstance.java:329) at org.nuxeo.ecm.platform.tag.AbstractTagService.tag(AbstractTagService.java:102) at org.nuxeo.ecm.platform.tag.operations.TagDocument.run(TagDocument.java:58) ... 139 more
it is caused by org.nuxeo.ecm.platform.tag.FacetedTagService.getTags(DocumentModel) which catches the PropertyNotFound excpeption and retuning a Collections.emptyList()