Fix error code when there is no input json

Change-Id: I20957e74414bdd32fc16a67e2ae827c4ccefa729
Merge "Fix error code when there is no input json"