Fix "Create a node" and "Add List Elements" APIs response code

Create a node and Add list elements APIs would return a 500 response
code when a JSON payload mismatching the Schema was sent as part of
the request body.

Updated the code to return response code 400.

Issue-ID: CPS-2319
Change-Id: I86d6af446966790d9e45045b330f0c411fcd0f1d
Signed-off-by: Arpit Singh <as00745003@techmahindra.com>
2 files changed