Type Alias: RpcHandlerResult
ts
type RpcHandlerResult =
| "ok"
| {
data: | XmlNode
| readonly XmlNode[];
}
| {
errors: readonly RpcErrorSpec[];
}
| {
body: readonly XmlNode[];
}
| undefined;Defined in: netconf/src/testing/fake-server.ts:47
What a handler returns:
'ok':<ok/>{ data }:<data>…</data>{ errors }: one<rpc-error>per entry{ body }: these children, verbatimundefined: send no reply at all (to test timeouts)
A handler that throws produces an operation-failed error.
Union Members
"ok"
Type Literal
ts
{
data: | XmlNode
| readonly XmlNode[];
}data
ts
readonly data:
| XmlNode
| readonly XmlNode[];The content of <data>.
Type Literal
ts
{
errors: readonly RpcErrorSpec[];
}errors
ts
readonly errors: readonly RpcErrorSpec[];One <rpc-error> per entry.
Type Literal
ts
{
body: readonly XmlNode[];
}body
ts
readonly body: readonly XmlNode[];The <rpc-reply> children, sent verbatim.
undefined