- String.format("Unable to handle rpc %s on session %s", messageAsString, session),
- e, DocumentedException.ErrorType.APPLICATION,
- tag, DocumentedException.ErrorSeverity.ERROR,
- Collections.singletonMap(tag.toString(), e.getMessage()));
+ String.format("Unable to handle rpc %s on session %s", messageAsString, session), e,
+ ErrorType.APPLICATION, tag, ErrorSeverity.ERROR,
+ // FIXME: i.e. in what namespace are we providing these tags? why is this not just:
+ //
+ // <java-throwable xmlns="org.opendaylight.something">
+ // <message>e.getMessage()</message>
+ // </java-throwable>
+ //
+ // for each place where we are mapping Exception.getMessage() ? We probably do not want to propagate
+ // stack traces out, but suppressed exceptions and causal list might be interesting:
+ //
+ // <java-throwable xmlns="org.opendaylight.something">
+ // <message>reported exception</message>
+ // </java-throwable>
+ // <java-throwable xmlns="org.opendaylight.something">
+ // <message>cause of reported exception</message>
+ // </java-throwable>
+ // <java-throwable xmlns="org.opendaylight.something">
+ // <message>cause of cause of reported exception</message>
+ // </java-throwable>
+ Map.of(tag.elementBody(), e.getMessage()));