Bug 8124 - get-schema rpc fails to send error message 70/54170/9
authormiroslav.kovac <miroslav.kovac@pantheon.tech>
Fri, 31 Mar 2017 09:36:51 +0000 (11:36 +0200)
committerTomas Cere <tcere@cisco.com>
Thu, 29 Jun 2017 07:41:47 +0000 (09:41 +0200)
Change-Id: If2d87beec2dd8c1b3579d10ddcb008d35effa289
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
netconf/netconf-monitoring/src/main/java/org/opendaylight/netconf/monitoring/GetSchema.java

index 1fb100368a98613118914634441030a0f93706a1..84801b1476bed92a97613cd80e3fa8eba151cffc 100644 (file)
@@ -57,7 +57,7 @@ public class GetSchema extends AbstractSingletonNetconfOperation {
             schema = cap.getSchemaForCapability(entry.identifier, entry.version);
         } catch (final IllegalStateException e) {
             final Map<String, String> errorInfo = Maps.newHashMap();
-            errorInfo.put(entry.identifier, e.getMessage());
+            errorInfo.put(DocumentedException.ErrorTag.OPERATION_FAILED.toString(), e.getMessage());
             LOG.warn("Rpc error: {}", DocumentedException.ErrorTag.OPERATION_FAILED, e);
             throw new DocumentedException(e.getMessage(), DocumentedException.ErrorType.APPLICATION,
                     DocumentedException.ErrorTag.OPERATION_FAILED,