backend: Handle RPC errors
Use the new RPC error reporting interface to report RPC errors from plugins. Signed-off-by: Corey Minyard <minyard@acm.org>
This commit is contained in:
parent
9bdacc8671
commit
25f7c56c0a
3 changed files with 10 additions and 16 deletions
|
|
@ -637,7 +637,7 @@ candidate_validate(clixon_handle h,
|
|||
* TODO: -1 return should be fatal error, not failed validation
|
||||
*/
|
||||
if (!cbuf_len(cbret) &&
|
||||
netconf_operation_failed(cbret, "application", clixon_err_reason())< 0)
|
||||
clixon_plugin_report_err(h, cbret) < 0)
|
||||
goto done;
|
||||
goto fail;
|
||||
}
|
||||
|
|
@ -857,7 +857,7 @@ from_client_commit(clixon_handle h,
|
|||
if ((ret = candidate_commit(h, xe, "candidate", myid, 0, cbret)) < 0){ /* Assume validation fail, nofatal */
|
||||
clixon_debug(CLIXON_DBG_BACKEND, "Commit candidate failed");
|
||||
if (ret < 0)
|
||||
if (netconf_operation_failed(cbret, "application", clixon_err_reason())< 0)
|
||||
if (clixon_plugin_report_err(h, cbret) < 0)
|
||||
goto done;
|
||||
goto ok;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue