-
Bug
-
Resolution: Done
-
Medium
-
Oxygen
-
None
If we are sending operational data using PUT request on device via mountpoint we expect 400 bad-request but we receive 500 instead.
Example request
BODY:
{ "toaster": { "darknessFactor": 200, "toasterModelNumber" : "asdfe" } }
toasterModelNumber is nonConfig data so I expect 400 bad request answer but instead I receive
{ "ietf-restconf:errors": { "error": [ { "error-message": "Transaction(PUT) not committed correctly", "error-tag": "operation-failed", "error-type": "application" } ] } }
This is caused by netconf sb
AbstractWriteTx class resultsToTxStatus method always changes data to same exception
new NetconfDocumentedException(id + ":RPC during tx failed", DocumentedException.ErrorType.APPLICATION, DocumentedException.ErrorTag.OPERATION_FAILED, DocumentedException.ErrorSeverity.ERROR);
and restconf FutureCallbackTx in method addCallback it always changes to
new RestconfDocumentedException("Transaction(" + txType + ") not committed correctly", e);
or
RpcResultBuilder.newError(RpcError.ErrorType.RPC, "operation-failed", e.getMessage())
but we alway loose error type and error tag.