First cut at REST errors
- Added a new client-facing class to hold a formatted error
- Renamed the existing RestError to be RestErrorCatalogEntry
- Modified the Intent POST operation to return an actual error if the
POST can't parse the inbound object
Change-Id: I05d8919626f1a9350262d4aee7919c0fc8a4fa09
diff --git a/src/main/java/net/onrc/onos/api/rest/RestErrorCodes.java b/src/main/java/net/onrc/onos/api/rest/RestErrorCodes.java
index 1d34615..09626d2 100644
--- a/src/main/java/net/onrc/onos/api/rest/RestErrorCodes.java
+++ b/src/main/java/net/onrc/onos/api/rest/RestErrorCodes.java
@@ -24,7 +24,10 @@
INTENT_ALREADY_EXISTS,
/** No path available for the Intent. */
- INTENT_NO_PATH
+ INTENT_NO_PATH,
+
+ /** An object specified for an intent is invalid (parsing error). */
+ INTENT_INVALID
}
}