Log a hint if handle-generic-xml doesn't find a record so that the user knows to configure "recordtagname"
Opened this issue · 4 comments
dr0i commented
Working on a LIDO document an unconfigured handle-generic-xml
flux command doesn't yield anything.
This could somehow be configured to be logged ? -The user should be hinted to configure (recordtagname="lido")
.
(problem surfaced in the SWIB23 Metafacture workshop)
dr0i commented
Thinking about this, some thoughts surfaced:
- If there would be logs they wouldn't be helpful for e.g. playground. One would have to throw an Exception (playground can display that) but it would be disputable to throw an exception only because (one) record in the stream didn't yield any data
- So it may be better to improve the documentation, i.e. the flux-commands.md , to point out the importance of the
recordtagname
, possibly noting the lido example - we also could provide Handlers of their own, like the
CGXmlHandler
, i.e. aLidoXmlHandler
- we could implement
LidoXmlHandler
just wrappingGenericXmlHandler
and setting the properrecordtagname
as a convenient shortcut (no need to set a parameter when usingGenericXmlHandler
instead) - the playground could evaluate the
flux
and, by finding the usage ofhandle-generic-xml
, printing a note in theResult
window, like "If you see this text here after clickingprocess
obviously the result was empty. As you usehandle-generic-xml
this may be caused by a wrongrecordtagname
. The default one isrecord
, which couldn't be found in the data. Have a look at theflux-commands.md
". Something like this.
WDYT @blackwinter @TobiasNx @fsteeg @maipet ?
I like the generic approach (2) by giving more examples ([onix](url), lido, maybe some more). And would like to see later (5) as a more dynamic help.
TobiasNx commented
Your suggestion 2: Sound good to me! +1
blackwinter commented
Option 2) is certainly the least intrusive 👍
fsteeg commented
+1 for 2)