Return correct error code when server stack fails.
Previously we supressed all stack level errors to OC_STACK_ERROR even
though there are more specific errors available. Also, we always sent
out CA_BAD_REQ causing the client to think it was always its fault.
Change-Id: I225558365c7aa7ba7ad09156f5f857f8effc1490
Signed-off-by: Mandeep Shetty <mandeep.shetty@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/710
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sakthivel Samidurai <sakthivel.samidurai@intel.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>