Skip to content

The tag owner cannot be null or empty #38

@mdavidsaver

Description

@mdavidsaver

I'm not sure if this is a phoebus issue or a service issue. I'm reporting here first on the theory that this still works with the original service.

Attempting to apply a tag through Channel Table fails. I don't see any obvious error in the phoebus log, but the service shows the following. From my recent playing around I recognize this as omitting the "owner" tag somewhere.

2021-05-01 19:08:04.273 DEBUG 3953 --- [nio-8080-exec-5] o.s.web.servlet.DispatcherServlet        : POST "/ChannelFinder/resources/tags/sometag", parameters={}
2021-05-01 19:08:04.274 DEBUG 3953 --- [nio-8080-exec-5] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to public gov.bnl.channelfinder.XmlTag gov.bnl.channelfinder.TagManager.update(java.lang.String,gov.bnl.channelfinder.XmlTag)
2021-05-01 19:08:04.275 DEBUG 3953 --- [nio-8080-exec-5] m.m.a.RequestResponseBodyMethodProcessor : Read "application/json;charset=UTF-8" to [gov.bnl.channelfinder.XmlTag@72167c57]
2021-05-01 19:08:04.275  INFO 3953 --- [nio-8080-exec-5] gov.bnl.channelfinder.TagManager.audit   : client initialization: 0
2021-05-01 19:08:04.276 ERROR 3953 --- [nio-8080-exec-5] gov.bnl.channelfinder.TagManager         : The tag owner cannot be null or empty sometag(null) [ bbbbbbb():[[][]] ] 

org.springframework.web.server.ResponseStatusException: 400 BAD_REQUEST
        at gov.bnl.channelfinder.TagManager.validateTagRequest(TagManager.java:523) ~[classes!/:na]
        at gov.bnl.channelfinder.TagManager.update(TagManager.java:296) ~[classes!/:na]
...

imo. it is annoying having always to include "owner" everywhere, even in places when I don't want ownership to change. eg. twice to apply a tag.

{"owner":"admin","name":"atag","channels":[{"name":"bar","owner":"admin"}]}

And three times to apply a property.

{"owner":"admin","name":"aprop","channels":[{"name":"bar","owner":"admin","properties":[{"name":"aprop","value":"foo","owner":"admin"}]}]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions