Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The tag owner cannot be null or empty #38

Open
mdavidsaver opened this issue May 1, 2021 · 0 comments
Open

The tag owner cannot be null or empty #38

mdavidsaver opened this issue May 1, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@mdavidsaver
Copy link
Contributor

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"}]}]}
@mdavidsaver mdavidsaver added the bug Something isn't working label May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant