luci-base: rpc.js: add ability to reject nonzero ubus statuses
authorJo-Philipp Wich <jo@mein.io>
Fri, 10 Apr 2020 20:50:41 +0000 (22:50 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 10 Apr 2020 20:50:41 +0000 (22:50 +0200)
commitbd713f870a974d46b214d07d85ac4a895d85a122
tree41da5cef1467fbdad124d54740c4b8f7b036472c
parent465891ff0239b8fdafb737d01e3f05205a14319b
luci-base: rpc.js: add ability to reject nonzero ubus statuses

Add a new declare option `reject` which makes the generated RPC call
function reject with an error in case the remote ubus call returned
a non-zero status.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/rpc.js