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:
Corey Minyard 2025-01-29 08:26:39 -08:00 committed by Olof Hagsand
parent 9bdacc8671
commit 25f7c56c0a
3 changed files with 10 additions and 16 deletions

View file

@ -723,7 +723,7 @@ from_client_edit_config(clixon_handle h,
}
}
if ((ret = candidate_commit(h, NULL, "candidate", myid, 0, cbret)) < 0){ /* Assume validation fail, nofatal */
if (netconf_operation_failed(cbret, "application", clixon_err_reason())< 0)
if (clixon_plugin_report_err(h, cbret) < 0)
goto done;
xmldb_copy(h, "running", "candidate");
goto ok;